Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 1da506ea5d8cd842380982b475ccf74c63211917
parent 42361c31f177a39dec40f8260268e4e5744e9400
Author: jeb <jeb@jebrosen.com>
Date:   Sun, 19 Aug 2018 03:43:56 -0600

Remove use of the 'const_fn' feature.

Diffstat:
Mcore/http/src/lib.rs | 1-
Mcore/http/src/status.rs | 4++--
Mcore/lib/src/lib.rs | 1-
Mexamples/todo/src/main.rs | 2+-
4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/core/http/src/lib.rs b/core/http/src/lib.rs @@ -1,6 +1,5 @@ #![feature(specialization)] #![feature(proc_macro_non_items)] -#![feature(const_fn)] #![feature(try_from)] #![feature(crate_visibility_modifier)] #![recursion_limit="256"] diff --git a/core/http/src/status.rs b/core/http/src/status.rs @@ -101,7 +101,7 @@ macro_rules! ctrs { #[doc=$reason] #[doc="</i>."] #[allow(non_upper_case_globals)] - pub const $name: Status = Status::new($code, $reason); + pub const $name: Status = Status { code: $code, reason: $reason }; )+ /// Returns a Status given a standard status code `code`. If `code` is @@ -155,7 +155,7 @@ impl Status { /// assert_eq!(custom.to_string(), "299 Somewhat Successful".to_string()); /// ``` #[inline(always)] - pub const fn new(code: u16, reason: &'static str) -> Status { + pub fn new(code: u16, reason: &'static str) -> Status { Status { code, reason } } diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs @@ -1,5 +1,4 @@ #![feature(specialization)] -#![feature(const_fn)] #![feature(plugin, decl_macro)] #![feature(try_trait)] #![feature(fnbox)] diff --git a/examples/todo/src/main.rs b/examples/todo/src/main.rs @@ -1,4 +1,4 @@ -#![feature(plugin, decl_macro, custom_derive, const_fn)] +#![feature(plugin, decl_macro, custom_derive)] #![plugin(rocket_codegen)] #[macro_use] extern crate rocket;