From 62355b424f5f364021e5005b4eda361fc1820b63 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sat, 11 Jul 2020 10:31:42 -0700 Subject: [PATCH] Remove use of stable 'proc_macro_hygiene' feature. --- contrib/codegen/build.rs | 4 +- contrib/lib/src/databases.rs | 8 - contrib/lib/src/json.rs | 4 - contrib/lib/src/msgpack.rs | 2 - contrib/lib/src/templates/metadata.rs | 3 - contrib/lib/src/templates/mod.rs | 2 - contrib/lib/src/uuid.rs | 2 - .../lib/tests/compress_responder.rs.disabled | 2 - .../lib/tests/compression_fairing.rs.disabled | 2 - contrib/lib/tests/helmet.rs | 2 - contrib/lib/tests/static_files.rs | 2 - contrib/lib/tests/templates.rs | 2 - core/codegen/build.rs | 4 +- core/codegen/src/lib.rs | 13 -- core/codegen/tests/async-routes.rs | 1 - core/codegen/tests/expansion.rs | 2 - core/codegen/tests/responder.rs | 2 - core/codegen/tests/route-data.rs | 2 - core/codegen/tests/route-format.rs | 2 - core/codegen/tests/route-ranking.rs | 2 - core/codegen/tests/route.rs | 2 - core/codegen/tests/typed-uris.rs | 1 - core/codegen/tests/ui-fail/catchers.rs | 2 - core/codegen/tests/ui-fail/catchers.stderr | 12 +- core/codegen/tests/ui-fail/responder-types.rs | 2 - .../tests/ui-fail/responder-types.stderr | 32 ++-- .../ui-fail/route-attribute-general-syntax.rs | 2 - .../route-attribute-general-syntax.stderr | 128 +++++++------- .../tests/ui-fail/route-path-bad-syntax.rs | 2 - .../ui-fail/route-path-bad-syntax.stderr | 160 +++++++++--------- .../tests/ui-fail/route-type-errors.rs | 2 - .../tests/ui-fail/route-type-errors.stderr | 44 ++--- core/codegen/tests/ui-fail/route-warnings.rs | 2 - .../tests/ui-fail/route-warnings.stderr | 28 +-- core/codegen/tests/ui-fail/routes.rs | 2 - core/codegen/tests/ui-fail/routes.stderr | 12 +- .../tests/ui-fail/typed-uri-bad-type.rs | 2 - .../tests/ui-fail/typed-uri-bad-type.stderr | 64 +++---- .../tests/ui-fail/typed-uris-bad-params.rs | 2 - .../ui-fail/typed-uris-bad-params.stderr | 140 +++++++-------- .../ui-fail/typed-uris-invalid-syntax.rs | 2 - .../ui-fail/typed-uris-invalid-syntax.stderr | 48 +++--- core/codegen/tests/ui-fail/uri_display.stderr | 104 ++++++------ core/codegen/tests/uri_display.rs | 2 - core/http/src/cookies.rs | 2 - core/http/src/lib.rs | 1 - core/http/src/uri/from_uri_param.rs | 1 - core/http/src/uri/uri_display.rs | 4 - core/lib/benches/format-routing.rs | 2 - core/lib/benches/ranked-routing.rs | 2 - core/lib/benches/simple-routing.rs | 2 - core/lib/build.rs | 4 +- core/lib/src/catcher.rs | 1 - core/lib/src/data/data.rs | 1 - core/lib/src/data/from_data.rs | 4 - core/lib/src/handler.rs | 1 - core/lib/src/lib.rs | 5 - core/lib/src/local/mod.rs | 2 - core/lib/src/outcome.rs | 1 - core/lib/src/request/form/error.rs | 1 - core/lib/src/request/form/form.rs | 3 - core/lib/src/request/form/from_form.rs | 2 - core/lib/src/request/form/from_form_value.rs | 1 - core/lib/src/request/form/lenient.rs | 2 - core/lib/src/request/from_request.rs | 4 - core/lib/src/request/param.rs | 3 - core/lib/src/request/query.rs | 2 - core/lib/src/request/state.rs | 2 - core/lib/src/response/debug.rs | 2 - core/lib/src/response/flash.rs | 1 - core/lib/src/response/redirect.rs | 1 - core/lib/src/response/responder.rs | 2 - core/lib/src/response/status.rs | 3 - core/lib/src/rocket.rs | 7 - core/lib/src/shutdown.rs | 1 - .../lib/tests/absolute-uris-okay-issue-443.rs | 2 - core/lib/tests/catcher-cookies-1213.rs | 2 - .../conditionally-set-server-header-996.rs | 2 - core/lib/tests/derive-reexports.rs | 2 - .../fairing_before_head_strip-issue-546.rs | 2 - .../lib/tests/flash-lazy-removes-issue-466.rs | 2 - core/lib/tests/form_method-issue-45.rs | 2 - .../lib/tests/form_value_decoding-issue-82.rs | 2 - core/lib/tests/head_handling.rs | 2 - core/lib/tests/limits.rs | 2 - .../local-request-content-type-issue-505.rs | 2 - .../local_request_private_cookie-issue-368.rs | 2 - core/lib/tests/nested-fairing-attaches.rs | 2 - .../tests/precise-content-type-matching.rs | 2 - .../tests/redirect_from_catcher-issue-113.rs | 2 - .../lib/tests/responder_lifetime-issue-345.rs | 1 - core/lib/tests/route_guard.rs | 2 - core/lib/tests/segments-issues-41-86.rs | 2 - core/lib/tests/strict_and_lenient_forms.rs | 2 - .../tests/uri-percent-encoding-issue-808.rs | 2 - examples/config/tests/development.rs | 2 - examples/config/tests/production.rs | 2 - examples/config/tests/staging.rs | 2 - examples/content_types/src/main.rs | 2 - examples/cookies/src/main.rs | 2 - examples/errors/src/main.rs | 2 - examples/fairings/src/main.rs | 2 - examples/form_kitchen_sink/src/main.rs | 2 - examples/form_validation/src/main.rs | 2 - examples/handlebars_templates/src/main.rs | 2 - examples/hello_person/src/main.rs | 2 - examples/json/src/main.rs | 2 - examples/managed_queue/src/main.rs | 2 - examples/msgpack/src/main.rs | 2 - examples/optional_redirect/src/main.rs | 2 - examples/pastebin/src/main.rs | 2 - examples/query_params/src/main.rs | 2 - examples/ranking/src/main.rs | 2 - examples/raw_sqlite/src/main.rs | 2 - examples/raw_upload/src/main.rs | 2 - examples/redirect/src/main.rs | 2 - examples/request_guard/src/main.rs | 2 - examples/request_local_state/src/main.rs | 2 - examples/session/src/main.rs | 2 - examples/state/src/main.rs | 2 - examples/stream/src/main.rs | 2 - examples/tera_templates/src/main.rs | 2 - examples/testing/src/main.rs | 2 - examples/tls/src/main.rs | 2 - examples/todo/src/main.rs | 2 - examples/uuid/src/main.rs | 2 - site/guide/10-pastebin.md | 5 - site/guide/2-getting-started.md | 2 - site/guide/3-overview.md | 14 +- site/guide/4-requests.md | 8 - site/guide/5-responses.md | 5 - site/guide/8-testing.md | 4 - site/guide/9-configuration.md | 2 - 133 files changed, 395 insertions(+), 676 deletions(-) diff --git a/contrib/codegen/build.rs b/contrib/codegen/build.rs index d970e939..ea7cb833 100644 --- a/contrib/codegen/build.rs +++ b/contrib/codegen/build.rs @@ -6,8 +6,8 @@ extern crate version_check; use yansi::{Paint, Color::{Red, Yellow, Blue}}; // Specifies the minimum nightly version needed to compile Rocket. -const MIN_DATE: &'static str = "2018-10-05"; -const MIN_VERSION: &'static str = "1.31.0-nightly"; +const MIN_DATE: &'static str = "2020-05-20"; +const MIN_VERSION: &'static str = "1.45.0-nightly"; macro_rules! err { ($version:expr, $date:expr, $msg:expr) => ( diff --git a/contrib/lib/src/databases.rs b/contrib/lib/src/databases.rs index 37a8a254..9ad58c52 100644 --- a/contrib/lib/src/databases.rs +++ b/contrib/lib/src/databases.rs @@ -50,8 +50,6 @@ //! In your application's source code, one-time: //! //! ```rust -//! #![feature(proc_macro_hygiene)] -//! //! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket_contrib; //! @@ -72,8 +70,6 @@ //! Whenever a connection to the database is needed: //! //! ```rust -//! # #![feature(proc_macro_hygiene)] -//! # //! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket_contrib; //! # @@ -288,8 +284,6 @@ //! connection to a given database: //! //! ```rust -//! # #![feature(proc_macro_hygiene)] -//! # //! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket_contrib; //! # @@ -310,8 +304,6 @@ //! connection type: //! //! ```rust -//! # #![feature(proc_macro_hygiene)] -//! # //! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket_contrib; //! # diff --git a/contrib/lib/src/json.rs b/contrib/lib/src/json.rs index 2d3d2246..029abd1e 100644 --- a/contrib/lib/src/json.rs +++ b/contrib/lib/src/json.rs @@ -43,7 +43,6 @@ pub use serde_json::{json_internal, json_internal_vec}; /// or from [`serde`]. The data is parsed from the HTTP request body. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # type User = usize; @@ -67,7 +66,6 @@ pub use serde_json::{json_internal, json_internal_vec}; /// set to `application/json` automatically. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # type User = usize; @@ -218,7 +216,6 @@ impl DerefMut for Json { /// fashion during request handling. This looks something like: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// use rocket_contrib::json::JsonValue; @@ -312,7 +309,6 @@ impl<'r> Responder<'r, 'static> for JsonValue { /// value created with this macro can be returned from a handler as follows: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// use rocket_contrib::json::JsonValue; diff --git a/contrib/lib/src/msgpack.rs b/contrib/lib/src/msgpack.rs index 6c7c79a0..5602b98d 100644 --- a/contrib/lib/src/msgpack.rs +++ b/contrib/lib/src/msgpack.rs @@ -41,7 +41,6 @@ pub use rmp_serde::decode::Error; /// request body. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # type User = usize; @@ -65,7 +64,6 @@ pub use rmp_serde::decode::Error; /// response is set to `application/msgpack` automatically. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # type User = usize; diff --git a/contrib/lib/src/templates/metadata.rs b/contrib/lib/src/templates/metadata.rs index 256eb663..0d1c386f 100644 --- a/contrib/lib/src/templates/metadata.rs +++ b/contrib/lib/src/templates/metadata.rs @@ -12,7 +12,6 @@ use crate::templates::ContextManager; /// used as a request guard in any request handler. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// use rocket_contrib::templates::{Template, Metadata}; @@ -46,7 +45,6 @@ impl Metadata<'_> { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # @@ -67,7 +65,6 @@ impl Metadata<'_> { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # extern crate rocket_contrib; /// # diff --git a/contrib/lib/src/templates/mod.rs b/contrib/lib/src/templates/mod.rs index 4e879764..09ebb7f2 100644 --- a/contrib/lib/src/templates/mod.rs +++ b/contrib/lib/src/templates/mod.rs @@ -37,7 +37,6 @@ //! of the template file minus the last two extensions, from a handler. //! //! ```rust -//! # #![feature(proc_macro_hygiene)] //! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket_contrib; //! # fn context() { } @@ -184,7 +183,6 @@ const DEFAULT_TEMPLATE_DIR: &str = "templates"; /// returned from a request handler directly: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// # fn context() { } diff --git a/contrib/lib/src/uuid.rs b/contrib/lib/src/uuid.rs index d415cc66..82848cd5 100644 --- a/contrib/lib/src/uuid.rs +++ b/contrib/lib/src/uuid.rs @@ -42,7 +42,6 @@ type ParseError = ::Err; /// You can use the `Uuid` type directly as a target of a dynamic parameter: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// use rocket_contrib::uuid::Uuid; @@ -56,7 +55,6 @@ type ParseError = ::Err; /// You can also use the `Uuid` as a form value, including in query strings: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket_contrib; /// use rocket_contrib::uuid::Uuid; diff --git a/contrib/lib/tests/compress_responder.rs.disabled b/contrib/lib/tests/compress_responder.rs.disabled index ee47f989..2256b0bf 100644 --- a/contrib/lib/tests/compress_responder.rs.disabled +++ b/contrib/lib/tests/compress_responder.rs.disabled @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] #[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))] extern crate rocket; diff --git a/contrib/lib/tests/compression_fairing.rs.disabled b/contrib/lib/tests/compression_fairing.rs.disabled index 91b280a1..03aba384 100644 --- a/contrib/lib/tests/compression_fairing.rs.disabled +++ b/contrib/lib/tests/compression_fairing.rs.disabled @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] #[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))] extern crate rocket; diff --git a/contrib/lib/tests/helmet.rs b/contrib/lib/tests/helmet.rs index ca68a799..fc869c95 100644 --- a/contrib/lib/tests/helmet.rs +++ b/contrib/lib/tests/helmet.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] #[cfg(feature = "helmet")] extern crate rocket; diff --git a/contrib/lib/tests/static_files.rs b/contrib/lib/tests/static_files.rs index d12755a4..b4cbb391 100644 --- a/contrib/lib/tests/static_files.rs +++ b/contrib/lib/tests/static_files.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[cfg(feature = "serve")] mod static_tests { use std::{io::Read, fs::File}; diff --git a/contrib/lib/tests/templates.rs b/contrib/lib/tests/templates.rs index b8e7900b..199454e7 100644 --- a/contrib/lib/tests/templates.rs +++ b/contrib/lib/tests/templates.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[cfg(feature = "templates")] #[macro_use] extern crate rocket; diff --git a/core/codegen/build.rs b/core/codegen/build.rs index 8ce97344..d44a1b92 100644 --- a/core/codegen/build.rs +++ b/core/codegen/build.rs @@ -3,8 +3,8 @@ use yansi::{Paint, Color::{Red, Yellow, Blue}}; // Specifies the minimum nightly version needed to compile Rocket. -const MIN_DATE: &'static str = "2019-12-29"; -const MIN_VERSION: &'static str = "1.42.0-nightly"; +const MIN_DATE: &'static str = "2020-05-20"; +const MIN_VERSION: &'static str = "1.45.0-nightly"; macro_rules! err { ($version:expr, $date:expr, $msg:expr) => ( diff --git a/core/codegen/src/lib.rs b/core/codegen/src/lib.rs index c7e779a4..e4742766 100644 --- a/core/codegen/src/lib.rs +++ b/core/codegen/src/lib.rs @@ -29,8 +29,6 @@ //! crate root: //! //! ```rust -//! #![feature(proc_macro_hygiene)] -//! //! #[macro_use] extern crate rocket; //! # #[get("/")] fn hello() { } //! # fn main() { rocket::ignite().mount("/", routes![hello]); } @@ -39,7 +37,6 @@ //! Or, alternatively, selectively import from the top-level scope: //! //! ```rust -//! #![feature(proc_macro_hygiene)] //! # extern crate rocket; //! //! use rocket::{get, routes}; @@ -152,7 +149,6 @@ macro_rules! route_attribute { /// functions: /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[get("/")] @@ -175,7 +171,6 @@ macro_rules! route_attribute { /// specified: /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[route(GET, path = "/")] @@ -236,7 +231,6 @@ macro_rules! route_attribute { /// the arguments `foo`, `baz`, `msg`, `rest`, and `form`: /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use rocket::request::Form; /// # use std::path::PathBuf; @@ -348,7 +342,6 @@ route_attribute!(options => Method::Options); /// This attribute can only be applied to free functions: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// use rocket::Request; @@ -778,7 +771,6 @@ pub fn derive_uri_display_path(input: TokenStream) -> TokenStream { /// corresponding [`Route`] structures. For example, given the following routes: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[get("/")] @@ -793,7 +785,6 @@ pub fn derive_uri_display_path(input: TokenStream) -> TokenStream { /// The `routes!` macro can be used as: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # use rocket::http::Method; @@ -837,7 +828,6 @@ pub fn routes(input: TokenStream) -> TokenStream { /// catchers: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[catch(404)] @@ -852,7 +842,6 @@ pub fn routes(input: TokenStream) -> TokenStream { /// The `catchers!` macro can be used as: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # #[catch(404)] fn not_found() { /* .. */ } @@ -894,7 +883,6 @@ pub fn catchers(input: TokenStream) -> TokenStream { /// For example, for the following route: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[get("/person/?")] @@ -908,7 +896,6 @@ pub fn catchers(input: TokenStream) -> TokenStream { /// A URI can be created as follows: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # #[get("/person/?")] diff --git a/core/codegen/tests/async-routes.rs b/core/codegen/tests/async-routes.rs index 0385a274..7354247d 100644 --- a/core/codegen/tests/async-routes.rs +++ b/core/codegen/tests/async-routes.rs @@ -1,4 +1,3 @@ -#![feature(proc_macro_hygiene)] #![allow(dead_code)] #[macro_use] extern crate rocket; diff --git a/core/codegen/tests/expansion.rs b/core/codegen/tests/expansion.rs index ed8a291a..50af1712 100644 --- a/core/codegen/tests/expansion.rs +++ b/core/codegen/tests/expansion.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::local::blocking::Client; diff --git a/core/codegen/tests/responder.rs b/core/codegen/tests/responder.rs index 8ffbe9d2..8e4ea834 100644 --- a/core/codegen/tests/responder.rs +++ b/core/codegen/tests/responder.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - use rocket::local::asynchronous::Client; use rocket::response::Responder; use rocket::http::{Status, ContentType, Cookie}; diff --git a/core/codegen/tests/route-data.rs b/core/codegen/tests/route-data.rs index f2edf9a1..1a5756d1 100644 --- a/core/codegen/tests/route-data.rs +++ b/core/codegen/tests/route-data.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::{Request, Data, Outcome::*}; diff --git a/core/codegen/tests/route-format.rs b/core/codegen/tests/route-format.rs index d0ab90b3..8fe4806d 100644 --- a/core/codegen/tests/route-format.rs +++ b/core/codegen/tests/route-format.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::local::blocking::Client; diff --git a/core/codegen/tests/route-ranking.rs b/core/codegen/tests/route-ranking.rs index ca5ce640..a4bc85de 100644 --- a/core/codegen/tests/route-ranking.rs +++ b/core/codegen/tests/route-ranking.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::local::blocking::Client; diff --git a/core/codegen/tests/route.rs b/core/codegen/tests/route.rs index b916dac8..8ae81dad 100644 --- a/core/codegen/tests/route.rs +++ b/core/codegen/tests/route.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - // Rocket sometimes generates mangled identifiers that activate the // non_snake_case lint. We deny the lint in this test to ensure that // code generation uses #[allow(non_snake_case)] in the appropriate places. diff --git a/core/codegen/tests/typed-uris.rs b/core/codegen/tests/typed-uris.rs index 7f366e7e..270acda9 100644 --- a/core/codegen/tests/typed-uris.rs +++ b/core/codegen/tests/typed-uris.rs @@ -1,4 +1,3 @@ -#![feature(proc_macro_hygiene)] #![allow(dead_code, unused_variables)] #[macro_use] extern crate rocket; diff --git a/core/codegen/tests/ui-fail/catchers.rs b/core/codegen/tests/ui-fail/catchers.rs index 627bf0c2..f747ffb3 100644 --- a/core/codegen/tests/ui-fail/catchers.rs +++ b/core/codegen/tests/ui-fail/catchers.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; fn main() { diff --git a/core/codegen/tests/ui-fail/catchers.stderr b/core/codegen/tests/ui-fail/catchers.stderr index 2029d877..0e294c4f 100644 --- a/core/codegen/tests/ui-fail/catchers.stderr +++ b/core/codegen/tests/ui-fail/catchers.stderr @@ -1,19 +1,19 @@ error: expected `,` - --> $DIR/catchers.rs:6:25 + --> $DIR/catchers.rs:4:25 | -6 | let _ = catchers![a b]; //~ ERROR expected +4 | let _ = catchers![a b]; //~ ERROR expected | ^ error: expected identifier - --> $DIR/catchers.rs:8:26 + --> $DIR/catchers.rs:6:26 | -8 | let _ = catchers![a::, ]; //~ ERROR expected identifier +6 | let _ = catchers![a::, ]; //~ ERROR expected identifier | ^ error: unexpected end of input, expected identifier - --> $DIR/catchers.rs:9:13 + --> $DIR/catchers.rs:7:13 | -9 | let _ = catchers![a::]; //~ ERROR expected identifier +7 | let _ = catchers![a::]; //~ ERROR expected identifier | ^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/responder-types.rs b/core/codegen/tests/ui-fail/responder-types.rs index ce0c1329..cb75f27a 100644 --- a/core/codegen/tests/ui-fail/responder-types.rs +++ b/core/codegen/tests/ui-fail/responder-types.rs @@ -2,8 +2,6 @@ // normalize-stderr-test: "and \d+ others" -> "and $$N others" // normalize-stderr-test: "::: (.*)/core/lib" -> "::: $$ROCKET/core/lib" -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[derive(Responder)] diff --git a/core/codegen/tests/ui-fail/responder-types.stderr b/core/codegen/tests/ui-fail/responder-types.stderr index 9e2ac6e3..4cc5e3fb 100644 --- a/core/codegen/tests/ui-fail/responder-types.stderr +++ b/core/codegen/tests/ui-fail/responder-types.stderr @@ -1,15 +1,15 @@ error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:11:5 - | -11 | thing: u8, - | ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8` - | - = note: required by `rocket::response::Responder::respond_to` + --> $DIR/responder-types.rs:9:5 + | +9 | thing: u8, + | ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8` + | + = note: required by `rocket::response::Responder::respond_to` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied - --> $DIR/responder-types.rs:18:5 + --> $DIR/responder-types.rs:16:5 | -18 | other: u8, +16 | other: u8, | ^^^^^^^^^ the trait `std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: @@ -18,17 +18,17 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` = note: required because of the requirements on the impl of `std::convert::Into>` for `u8` error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:24:5 + --> $DIR/responder-types.rs:22:5 | -24 | thing: u8, +22 | thing: u8, | ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8` | = note: required by `rocket::response::Responder::respond_to` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied - --> $DIR/responder-types.rs:26:5 + --> $DIR/responder-types.rs:24:5 | -26 | other: u8, +24 | other: u8, | ^^^^^^^^^ the trait `std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: @@ -37,9 +37,9 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` = note: required because of the requirements on the impl of `std::convert::Into>` for `u8` error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From` is not satisfied - --> $DIR/responder-types.rs:34:5 + --> $DIR/responder-types.rs:32:5 | -34 | then: String, +32 | then: String, | ^^^^^^^^^^^^ the trait `std::convert::From` is not implemented for `rocket::http::Header<'_>` | = help: the following implementations were found: @@ -48,9 +48,9 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From>` for `std::string::String` error[E0277]: the trait bound `usize: rocket::response::Responder<'_, '_>` is not satisfied - --> $DIR/responder-types.rs:39:13 + --> $DIR/responder-types.rs:37:13 | -39 | fn foo() -> usize { 0 } +37 | fn foo() -> usize { 0 } | ^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `usize` | = note: required by `rocket::handler::, rocket::http::Status, rocket::Data>>::from` diff --git a/core/codegen/tests/ui-fail/route-attribute-general-syntax.rs b/core/codegen/tests/ui-fail/route-attribute-general-syntax.rs index 8457f96b..cd44c9d8 100644 --- a/core/codegen/tests/ui-fail/route-attribute-general-syntax.rs +++ b/core/codegen/tests/ui-fail/route-attribute-general-syntax.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; // Check a path is supplied, at least. diff --git a/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr index d2e3f2ed..ca93f49f 100644 --- a/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr +++ b/core/codegen/tests/ui-fail/route-attribute-general-syntax.stderr @@ -1,216 +1,216 @@ error: missing expected parameter: `path` - --> $DIR/route-attribute-general-syntax.rs:7:1 + --> $DIR/route-attribute-general-syntax.rs:5:1 | -7 | #[get()] //~ ERROR missing expected parameter +5 | #[get()] //~ ERROR missing expected parameter | ^^^^^^^^ | = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:13:1 + --> $DIR/route-attribute-general-syntax.rs:11:1 | -13 | struct S; +11 | struct S; | ^^^^^^ | = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:18:1 + --> $DIR/route-attribute-general-syntax.rs:16:1 | -18 | enum A { } +16 | enum A { } | ^^^^ | = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:23:1 + --> $DIR/route-attribute-general-syntax.rs:21:1 | -23 | trait Foo { } +21 | trait Foo { } | ^^^^^ | = help: #[get] can only be used on functions error: expected `fn` - --> $DIR/route-attribute-general-syntax.rs:28:1 + --> $DIR/route-attribute-general-syntax.rs:26:1 | -28 | impl S { } +26 | impl S { } | ^^^^ | = help: #[get] can only be used on functions error: expected key/value pair - --> $DIR/route-attribute-general-syntax.rs:34:12 + --> $DIR/route-attribute-general-syntax.rs:32:12 | -34 | #[get("/", 123)] //~ ERROR expected +32 | #[get("/", 123)] //~ ERROR expected | ^^^ error: expected key/value pair - --> $DIR/route-attribute-general-syntax.rs:37:12 + --> $DIR/route-attribute-general-syntax.rs:35:12 | -37 | #[get("/", "/")] //~ ERROR expected +35 | #[get("/", "/")] //~ ERROR expected | ^^^ error: unexpected keyed parameter: expected literal or identifier - --> $DIR/route-attribute-general-syntax.rs:40:7 + --> $DIR/route-attribute-general-syntax.rs:38:7 | -40 | #[get(data = "", "/")] //~ ERROR unexpected keyed parameter +38 | #[get(data = "", "/")] //~ ERROR unexpected keyed parameter | ^^^^^^^^^^^^^^ error: unexpected attribute parameter: `unknown` - --> $DIR/route-attribute-general-syntax.rs:43:12 + --> $DIR/route-attribute-general-syntax.rs:41:12 | -43 | #[get("/", unknown = "foo")] //~ ERROR unexpected +41 | #[get("/", unknown = "foo")] //~ ERROR unexpected | ^^^^^^^^^^^^^^^ error: malformed attribute - --> $DIR/route-attribute-general-syntax.rs:46:1 + --> $DIR/route-attribute-general-syntax.rs:44:1 | -46 | #[get("/", ...)] //~ ERROR malformed +44 | #[get("/", ...)] //~ ERROR malformed | ^^^^^^^^^^^^^^^^ | = help: expected syntax: #[get(key = value, ..)] = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) error: handler arguments cannot be ignored - --> $DIR/route-attribute-general-syntax.rs:53:7 + --> $DIR/route-attribute-general-syntax.rs:51:7 | -53 | fn c1(_: usize) {} //~ ERROR cannot be ignored +51 | fn c1(_: usize) {} //~ ERROR cannot be ignored | ^^^^^^^^ | = help: all handler arguments must be of the form: `ident: Type` error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:58:7 + --> $DIR/route-attribute-general-syntax.rs:56:7 | -58 | #[get(100)] //~ ERROR expected string +56 | #[get(100)] //~ ERROR expected string | ^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:61:7 + --> $DIR/route-attribute-general-syntax.rs:59:7 | -61 | #[get('/')] //~ ERROR expected string +59 | #[get('/')] //~ ERROR expected string | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:64:19 + --> $DIR/route-attribute-general-syntax.rs:62:19 | -64 | #[get("/", rank = "1")] //~ ERROR expected integer +62 | #[get("/", rank = "1")] //~ ERROR expected integer | ^^^ error: invalid value: expected integer literal - --> $DIR/route-attribute-general-syntax.rs:67:19 + --> $DIR/route-attribute-general-syntax.rs:65:19 | -67 | #[get("/", rank = '1')] //~ ERROR expected integer +65 | #[get("/", rank = '1')] //~ ERROR expected integer | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:72:21 + --> $DIR/route-attribute-general-syntax.rs:70:21 | -72 | #[get("/", format = "applicationx-custom")] //~ ERROR invalid or unknown media type +70 | #[get("/", format = "applicationx-custom")] //~ ERROR invalid or unknown media type | ^^^^^^^^^^^^^^^^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:75:21 + --> $DIR/route-attribute-general-syntax.rs:73:21 | -75 | #[get("/", format = "")] //~ ERROR invalid or unknown media type +73 | #[get("/", format = "")] //~ ERROR invalid or unknown media type | ^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:78:21 + --> $DIR/route-attribute-general-syntax.rs:76:21 | -78 | #[get("/", format = "//")] //~ ERROR invalid or unknown media type +76 | #[get("/", format = "//")] //~ ERROR invalid or unknown media type | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:81:21 + --> $DIR/route-attribute-general-syntax.rs:79:21 | -81 | #[get("/", format = "/")] //~ ERROR invalid or unknown media type +79 | #[get("/", format = "/")] //~ ERROR invalid or unknown media type | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:84:21 + --> $DIR/route-attribute-general-syntax.rs:82:21 | -84 | #[get("/", format = "a/")] //~ ERROR invalid or unknown media type +82 | #[get("/", format = "a/")] //~ ERROR invalid or unknown media type | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:87:21 + --> $DIR/route-attribute-general-syntax.rs:85:21 | -87 | #[get("/", format = "/a")] //~ ERROR invalid or unknown media type +85 | #[get("/", format = "/a")] //~ ERROR invalid or unknown media type | ^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:90:21 + --> $DIR/route-attribute-general-syntax.rs:88:21 | -90 | #[get("/", format = "/a/")] //~ ERROR invalid or unknown media type +88 | #[get("/", format = "/a/")] //~ ERROR invalid or unknown media type | ^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:93:21 + --> $DIR/route-attribute-general-syntax.rs:91:21 | -93 | #[get("/", format = "a/b/")] //~ ERROR invalid or unknown media type +91 | #[get("/", format = "a/b/")] //~ ERROR invalid or unknown media type | ^^^^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:96:21 + --> $DIR/route-attribute-general-syntax.rs:94:21 | -96 | #[get("/", format = "unknown")] //~ ERROR unknown media type +94 | #[get("/", format = "unknown")] //~ ERROR unknown media type | ^^^^^^^^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:99:21 + --> $DIR/route-attribute-general-syntax.rs:97:21 | -99 | #[get("/", format = 12)] //~ ERROR expected string +97 | #[get("/", format = 12)] //~ ERROR expected string | ^^ error: invalid value: expected string literal - --> $DIR/route-attribute-general-syntax.rs:102:21 + --> $DIR/route-attribute-general-syntax.rs:100:21 | -102 | #[get("/", format = 'j')] //~ ERROR expected string +100 | #[get("/", format = 'j')] //~ ERROR expected string | ^^^ error: invalid or unknown media type - --> $DIR/route-attribute-general-syntax.rs:105:21 + --> $DIR/route-attribute-general-syntax.rs:103:21 | -105 | #[get("/", format = "text//foo")] //~ ERROR invalid or unknown media type +103 | #[get("/", format = "text//foo")] //~ ERROR invalid or unknown media type | ^^^^^^^^^^^ error: invalid HTTP method for route handlers - --> $DIR/route-attribute-general-syntax.rs:110:9 + --> $DIR/route-attribute-general-syntax.rs:108:9 | -110 | #[route(CONNECT, "/")] //~ ERROR invalid HTTP method for route +108 | #[route(CONNECT, "/")] //~ ERROR invalid HTTP method for route | ^^^^^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: invalid HTTP method - --> $DIR/route-attribute-general-syntax.rs:114:9 + --> $DIR/route-attribute-general-syntax.rs:112:9 | -114 | #[route(FIX, "/")] //~ ERROR invalid HTTP method +112 | #[route(FIX, "/")] //~ ERROR invalid HTTP method | ^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found string literal - --> $DIR/route-attribute-general-syntax.rs:118:9 + --> $DIR/route-attribute-general-syntax.rs:116:9 | -118 | #[route("hi", "/")] //~ ERROR expected identifier +116 | #[route("hi", "/")] //~ ERROR expected identifier | ^^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found string literal - --> $DIR/route-attribute-general-syntax.rs:122:9 + --> $DIR/route-attribute-general-syntax.rs:120:9 | -122 | #[route("GET", "/")] //~ ERROR expected identifier +120 | #[route("GET", "/")] //~ ERROR expected identifier | ^^^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` error: expected identifier, found integer literal - --> $DIR/route-attribute-general-syntax.rs:126:9 + --> $DIR/route-attribute-general-syntax.rs:124:9 | -126 | #[route(120, "/")] //~ ERROR expected identifier +124 | #[route(120, "/")] //~ ERROR expected identifier | ^^^ | = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` diff --git a/core/codegen/tests/ui-fail/route-path-bad-syntax.rs b/core/codegen/tests/ui-fail/route-path-bad-syntax.rs index ab6a8a4a..819b5a0d 100644 --- a/core/codegen/tests/ui-fail/route-path-bad-syntax.rs +++ b/core/codegen/tests/ui-fail/route-path-bad-syntax.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; // Check that route paths are absolute and normalized. diff --git a/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr index 8e33d7e6..226fd753 100644 --- a/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr +++ b/core/codegen/tests/ui-fail/route-path-bad-syntax.stderr @@ -1,262 +1,262 @@ error: invalid path URI: expected token '/' but found 'a' at index 0 - --> $DIR/route-path-bad-syntax.rs:7:8 + --> $DIR/route-path-bad-syntax.rs:5:8 | -7 | #[get("a")] //~ ERROR invalid path URI +5 | #[get("a")] //~ ERROR invalid path URI | ^^ | = help: expected path in origin form: "/path/" error: invalid path URI: expected token '/' but none was found at index 0 - --> $DIR/route-path-bad-syntax.rs:11:8 - | -11 | #[get("")] //~ ERROR invalid path URI - | ^ - | - = help: expected path in origin form: "/path/" + --> $DIR/route-path-bad-syntax.rs:9:8 + | +9 | #[get("")] //~ ERROR invalid path URI + | ^ + | + = help: expected path in origin form: "/path/" error: invalid path URI: expected token '/' but found 'a' at index 0 - --> $DIR/route-path-bad-syntax.rs:15:8 + --> $DIR/route-path-bad-syntax.rs:13:8 | -15 | #[get("a/b/c")] //~ ERROR invalid path URI +13 | #[get("a/b/c")] //~ ERROR invalid path URI | ^^^^^^ | = help: expected path in origin form: "/path/" error: paths cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:19:7 + --> $DIR/route-path-bad-syntax.rs:17:7 | -19 | #[get("/a///b")] //~ ERROR empty segments +17 | #[get("/a///b")] //~ ERROR empty segments | ^^^^^^^^ | = note: expected '/a/b', found '/a///b' error: query cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:23:10 + --> $DIR/route-path-bad-syntax.rs:21:10 | -23 | #[get("/?bat&&")] //~ ERROR empty segments +21 | #[get("/?bat&&")] //~ ERROR empty segments | ^^^^^ error: query cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:26:10 + --> $DIR/route-path-bad-syntax.rs:24:10 | -26 | #[get("/?bat&&")] //~ ERROR empty segments +24 | #[get("/?bat&&")] //~ ERROR empty segments | ^^^^^ error: paths cannot contain empty segments - --> $DIR/route-path-bad-syntax.rs:29:7 + --> $DIR/route-path-bad-syntax.rs:27:7 | -29 | #[get("/a/b//")] //~ ERROR empty segments +27 | #[get("/a/b//")] //~ ERROR empty segments | ^^^^^^^^ | = note: expected '/a/b', found '/a/b//' error: invalid path URI: expected EOF but found '#' at index 3 - --> $DIR/route-path-bad-syntax.rs:35:11 + --> $DIR/route-path-bad-syntax.rs:33:11 | -35 | #[get("/!@#$%^&*()")] //~ ERROR invalid path URI +33 | #[get("/!@#$%^&*()")] //~ ERROR invalid path URI | ^^^^^^^^^ | = help: expected path in origin form: "/path/" error: component contains invalid URI characters - --> $DIR/route-path-bad-syntax.rs:39:9 + --> $DIR/route-path-bad-syntax.rs:37:9 | -39 | #[get("/a%20b")] //~ ERROR invalid URI characters +37 | #[get("/a%20b")] //~ ERROR invalid URI characters | ^^^^^ | = note: components cannot contain reserved characters = help: reserved characters include: '%', '+', '&', etc. error: component contains invalid URI characters - --> $DIR/route-path-bad-syntax.rs:44:11 + --> $DIR/route-path-bad-syntax.rs:42:11 | -44 | #[get("/a?a%20b")] //~ ERROR invalid URI characters +42 | #[get("/a?a%20b")] //~ ERROR invalid URI characters | ^^^^^ | = note: components cannot contain reserved characters = help: reserved characters include: '%', '+', '&', etc. error: component contains invalid URI characters - --> $DIR/route-path-bad-syntax.rs:49:11 + --> $DIR/route-path-bad-syntax.rs:47:11 | -49 | #[get("/a?a+b")] //~ ERROR invalid URI characters +47 | #[get("/a?a+b")] //~ ERROR invalid URI characters | ^^^ | = note: components cannot contain reserved characters = help: reserved characters include: '%', '+', '&', etc. error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:56:9 + --> $DIR/route-path-bad-syntax.rs:54:9 | -56 | #[get("/")] //~ ERROR unused dynamic parameter +54 | #[get("/")] //~ ERROR unused dynamic parameter | ^^^^^^ | note: expected argument named `name` here - --> $DIR/route-path-bad-syntax.rs:57:7 + --> $DIR/route-path-bad-syntax.rs:55:7 | -57 | fn h0(_name: usize) {} //~ NOTE expected argument named `name` here +55 | fn h0(_name: usize) {} //~ NOTE expected argument named `name` here | ^^^^^^^^^^^^ error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:59:11 + --> $DIR/route-path-bad-syntax.rs:57:11 | -59 | #[get("/a?")] //~ ERROR unused dynamic parameter +57 | #[get("/a?")] //~ ERROR unused dynamic parameter | ^^^ | note: expected argument named `r` here - --> $DIR/route-path-bad-syntax.rs:60:1 + --> $DIR/route-path-bad-syntax.rs:58:1 | -60 | fn h1() {} //~ NOTE expected argument named `r` here +58 | fn h1() {} //~ NOTE expected argument named `r` here | ^^^^^^^^^^ error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:62:22 + --> $DIR/route-path-bad-syntax.rs:60:22 | -62 | #[post("/a", data = "")] //~ ERROR unused dynamic parameter +60 | #[post("/a", data = "")] //~ ERROR unused dynamic parameter | ^^^^^^ | note: expected argument named `test` here - --> $DIR/route-path-bad-syntax.rs:63:1 + --> $DIR/route-path-bad-syntax.rs:61:1 | -63 | fn h2() {} //~ NOTE expected argument named `test` here +61 | fn h2() {} //~ NOTE expected argument named `test` here | ^^^^^^^^^^ error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:65:9 + --> $DIR/route-path-bad-syntax.rs:63:9 | -65 | #[get("/<_r>")] //~ ERROR unused dynamic parameter +63 | #[get("/<_r>")] //~ ERROR unused dynamic parameter | ^^^^ | note: expected argument named `_r` here - --> $DIR/route-path-bad-syntax.rs:66:1 + --> $DIR/route-path-bad-syntax.rs:64:1 | -66 | fn h3() {} //~ NOTE expected argument named `_r` here +64 | fn h3() {} //~ NOTE expected argument named `_r` here | ^^^^^^^^^^ error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:68:9 + --> $DIR/route-path-bad-syntax.rs:66:9 | -68 | #[get("/<_r>/")] //~ ERROR unused dynamic parameter +66 | #[get("/<_r>/")] //~ ERROR unused dynamic parameter | ^^^^ | note: expected argument named `_r` here - --> $DIR/route-path-bad-syntax.rs:70:1 + --> $DIR/route-path-bad-syntax.rs:68:1 | -70 | fn h4() {} //~ NOTE expected argument named `_r` here +68 | fn h4() {} //~ NOTE expected argument named `_r` here | ^^^^^^^^^^ error: unused dynamic parameter - --> $DIR/route-path-bad-syntax.rs:68:14 + --> $DIR/route-path-bad-syntax.rs:66:14 | -68 | #[get("/<_r>/")] //~ ERROR unused dynamic parameter +66 | #[get("/<_r>/")] //~ ERROR unused dynamic parameter | ^^^ | note: expected argument named `b` here - --> $DIR/route-path-bad-syntax.rs:70:1 + --> $DIR/route-path-bad-syntax.rs:68:1 | -70 | fn h4() {} //~ NOTE expected argument named `_r` here +68 | fn h4() {} //~ NOTE expected argument named `_r` here | ^^^^^^^^^^ error: `foo_.` is not a valid identifier - --> $DIR/route-path-bad-syntax.rs:75:9 + --> $DIR/route-path-bad-syntax.rs:73:9 | -75 | #[get("/")] //~ ERROR `foo_.` is not a valid identifier +73 | #[get("/")] //~ ERROR `foo_.` is not a valid identifier | ^^^^^^^ | = help: parameter names must be valid identifiers error: `foo*` is not a valid identifier - --> $DIR/route-path-bad-syntax.rs:79:9 + --> $DIR/route-path-bad-syntax.rs:77:9 | -79 | #[get("/")] //~ ERROR `foo*` is not a valid identifier +77 | #[get("/")] //~ ERROR `foo*` is not a valid identifier | ^^^^^^ | = help: parameter names must be valid identifiers error: `!` is not a valid identifier - --> $DIR/route-path-bad-syntax.rs:83:9 + --> $DIR/route-path-bad-syntax.rs:81:9 | -83 | #[get("/")] //~ ERROR `!` is not a valid identifier +81 | #[get("/")] //~ ERROR `!` is not a valid identifier | ^^^ | = help: parameter names must be valid identifiers error: `name>: $DIR/route-path-bad-syntax.rs:87:9 + --> $DIR/route-path-bad-syntax.rs:85:9 | -87 | #[get("/:")] //~ ERROR `name>::")] //~ ERROR `name>: $DIR/route-path-bad-syntax.rs:93:20 + --> $DIR/route-path-bad-syntax.rs:91:20 | -93 | #[get("/", data = "foo")] //~ ERROR malformed parameter +91 | #[get("/", data = "foo")] //~ ERROR malformed parameter | ^^^ | = help: parameter must be of the form '' error: malformed parameter - --> $DIR/route-path-bad-syntax.rs:97:20 + --> $DIR/route-path-bad-syntax.rs:95:20 | -97 | #[get("/", data = "")] //~ ERROR malformed parameter +95 | #[get("/", data = "")] //~ ERROR malformed parameter | ^^^^^^^ | = help: parameter must be of the form '' error: parameter is missing a closing bracket - --> $DIR/route-path-bad-syntax.rs:101:20 - | -101 | #[get("/", data = "'? + --> $DIR/route-path-bad-syntax.rs:99:20 + | +99 | #[get("/", data = "'? error: `test ` is not a valid identifier - --> $DIR/route-path-bad-syntax.rs:105:20 + --> $DIR/route-path-bad-syntax.rs:103:20 | -105 | #[get("/", data = "")] //~ ERROR `test ` is not a valid identifier +103 | #[get("/", data = "")] //~ ERROR `test ` is not a valid identifier | ^^^^^^^ | = help: parameter names must be valid identifiers error: parameters must be named - --> $DIR/route-path-bad-syntax.rs:111:9 + --> $DIR/route-path-bad-syntax.rs:109:9 | -111 | #[get("/<_>")] //~ ERROR must be named +109 | #[get("/<_>")] //~ ERROR must be named | ^^^ | = help: use a name such as `_guard` or `_param` error: parameter names cannot be empty - --> $DIR/route-path-bad-syntax.rs:116:9 + --> $DIR/route-path-bad-syntax.rs:114:9 | -116 | #[get("/<>")] //~ ERROR cannot be empty +114 | #[get("/<>")] //~ ERROR cannot be empty | ^^ error: malformed parameter or identifier - --> $DIR/route-path-bad-syntax.rs:119:9 + --> $DIR/route-path-bad-syntax.rs:117:9 | -119 | #[get("/<")] //~ ERROR malformed parameter +117 | #[get("/<")] //~ ERROR malformed parameter | ^^^^^ | = help: parameters must be of the form '' = help: identifiers cannot contain '<' or '>' error: malformed parameter or identifier - --> $DIR/route-path-bad-syntax.rs:124:9 + --> $DIR/route-path-bad-syntax.rs:122:9 | -124 | #[get("/<<<<")] //~ ERROR malformed parameter +122 | #[get("/<<<<")] //~ ERROR malformed parameter | ^^^^^^^^ | = help: parameters must be of the form '' = help: identifiers cannot contain '<' or '>' error: malformed parameter or identifier - --> $DIR/route-path-bad-syntax.rs:129:9 + --> $DIR/route-path-bad-syntax.rs:127:9 | -129 | #[get("/<>name><")] //~ ERROR malformed parameter +127 | #[get("/<>name><")] //~ ERROR malformed parameter | ^^^^^^^^ | = help: parameters must be of the form '' diff --git a/core/codegen/tests/ui-fail/route-type-errors.rs b/core/codegen/tests/ui-fail/route-type-errors.rs index f97645ae..f1758cc5 100644 --- a/core/codegen/tests/ui-fail/route-type-errors.rs +++ b/core/codegen/tests/ui-fail/route-type-errors.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; struct Q; diff --git a/core/codegen/tests/ui-fail/route-type-errors.stderr b/core/codegen/tests/ui-fail/route-type-errors.stderr index 5466c67b..1fada777 100644 --- a/core/codegen/tests/ui-fail/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail/route-type-errors.stderr @@ -1,63 +1,63 @@ error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:8:7 + --> $DIR/route-type-errors.rs:6:7 | -8 | fn f0(foo: Q) {} //~ ERROR FromParam +6 | fn f0(foo: Q) {} //~ ERROR FromParam | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromSegments<'_>` is not satisfied - --> $DIR/route-type-errors.rs:11:7 - | -11 | fn f1(foo: Q) {} //~ ERROR FromSegments - | ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q` + --> $DIR/route-type-errors.rs:9:7 + | +9 | fn f1(foo: Q) {} //~ ERROR FromSegments + | ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromFormValue<'_>` is not satisfied - --> $DIR/route-type-errors.rs:14:7 + --> $DIR/route-type-errors.rs:12:7 | -14 | fn f2(foo: Q) {} //~ ERROR FromFormValue +12 | fn f2(foo: Q) {} //~ ERROR FromFormValue | ^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromQuery<'_>` is not satisfied - --> $DIR/route-type-errors.rs:17:7 + --> $DIR/route-type-errors.rs:15:7 | -17 | fn f3(foo: Q) {} //~ ERROR FromQuery +15 | fn f3(foo: Q) {} //~ ERROR FromQuery | ^^^^^^ the trait `rocket::request::FromQuery<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::data::FromDataSimple` is not satisfied - --> $DIR/route-type-errors.rs:20:7 + --> $DIR/route-type-errors.rs:18:7 | -20 | fn f4(foo: Q) {} //~ ERROR FromData +18 | fn f4(foo: Q) {} //~ ERROR FromData | ^^^^^^ the trait `rocket::data::FromDataSimple` is not implemented for `Q` | = note: required because of the requirements on the impl of `rocket::data::FromData<'_>` for `Q` error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied - --> $DIR/route-type-errors.rs:23:7 + --> $DIR/route-type-errors.rs:21:7 | -23 | fn f5(a: Q, foo: Q) {} +21 | fn f5(a: Q, foo: Q) {} | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:23:13 + --> $DIR/route-type-errors.rs:21:13 | -23 | fn f5(a: Q, foo: Q) {} +21 | fn f5(a: Q, foo: Q) {} | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied - --> $DIR/route-type-errors.rs:28:7 + --> $DIR/route-type-errors.rs:26:7 | -28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} +26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:28:13 + --> $DIR/route-type-errors.rs:26:13 | -28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} +26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied - --> $DIR/route-type-errors.rs:28:34 + --> $DIR/route-type-errors.rs:26:34 | -28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} +26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q` error: aborting due to 10 previous errors diff --git a/core/codegen/tests/ui-fail/route-warnings.rs b/core/codegen/tests/ui-fail/route-warnings.rs index 9111a216..c2265ac0 100644 --- a/core/codegen/tests/ui-fail/route-warnings.rs +++ b/core/codegen/tests/ui-fail/route-warnings.rs @@ -1,7 +1,5 @@ // must-compile-successfully -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; // Check for unknown media types. diff --git a/core/codegen/tests/ui-fail/route-warnings.stderr b/core/codegen/tests/ui-fail/route-warnings.stderr index 487b53aa..7e415563 100644 --- a/core/codegen/tests/ui-fail/route-warnings.stderr +++ b/core/codegen/tests/ui-fail/route-warnings.stderr @@ -1,44 +1,44 @@ warning: 'application/x-custom' is not a known media type - --> $DIR/route-warnings.rs:9:21 + --> $DIR/route-warnings.rs:7:21 | -9 | #[get("/", format = "application/x-custom")] //~ WARNING not a known media type +7 | #[get("/", format = "application/x-custom")] //~ WARNING not a known media type | ^^^^^^^^^^^^^^^^^^^^^^ warning: 'x-custom/plain' is not a known media type - --> $DIR/route-warnings.rs:12:21 + --> $DIR/route-warnings.rs:10:21 | -12 | #[get("/", format = "x-custom/plain")] //~ WARNING not a known media type +10 | #[get("/", format = "x-custom/plain")] //~ WARNING not a known media type | ^^^^^^^^^^^^^^^^ warning: 'x-custom/x-custom' is not a known media type - --> $DIR/route-warnings.rs:15:21 + --> $DIR/route-warnings.rs:13:21 | -15 | #[get("/", format = "x-custom/x-custom")] //~ WARNING not a known media type +13 | #[get("/", format = "x-custom/x-custom")] //~ WARNING not a known media type | ^^^^^^^^^^^^^^^^^^^ warning: `data` used with non-payload-supporting method - --> $DIR/route-warnings.rs:20:12 + --> $DIR/route-warnings.rs:18:12 | -20 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method +18 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method | ^^^^^^^^^^^^^^^ | note: 'GET' does not typically support payloads - --> $DIR/route-warnings.rs:20:3 + --> $DIR/route-warnings.rs:18:3 | -20 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method +18 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method | ^^^ = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) warning: `data` used with non-payload-supporting method - --> $DIR/route-warnings.rs:23:13 + --> $DIR/route-warnings.rs:21:13 | -23 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method +21 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method | ^^^^^^^^^^^^^^^ | note: 'HEAD' does not typically support payloads - --> $DIR/route-warnings.rs:23:3 + --> $DIR/route-warnings.rs:21:3 | -23 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method +21 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method | ^^^^ = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/routes.rs b/core/codegen/tests/ui-fail/routes.rs index 954293a5..b6f91e9b 100644 --- a/core/codegen/tests/ui-fail/routes.rs +++ b/core/codegen/tests/ui-fail/routes.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; fn main() { diff --git a/core/codegen/tests/ui-fail/routes.stderr b/core/codegen/tests/ui-fail/routes.stderr index 17779157..9ffd7f9c 100644 --- a/core/codegen/tests/ui-fail/routes.stderr +++ b/core/codegen/tests/ui-fail/routes.stderr @@ -1,19 +1,19 @@ error: expected `,` - --> $DIR/routes.rs:6:23 + --> $DIR/routes.rs:4:23 | -6 | let _ = routes![a b]; //~ ERROR expected `,` +4 | let _ = routes![a b]; //~ ERROR expected `,` | ^ error: expected identifier - --> $DIR/routes.rs:8:24 + --> $DIR/routes.rs:6:24 | -8 | let _ = routes![a::, ]; //~ ERROR expected identifier +6 | let _ = routes![a::, ]; //~ ERROR expected identifier | ^ error: unexpected end of input, expected identifier - --> $DIR/routes.rs:9:13 + --> $DIR/routes.rs:7:13 | -9 | let _ = routes![a::]; //~ ERROR expected identifier +7 | let _ = routes![a::]; //~ ERROR expected identifier | ^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/typed-uri-bad-type.rs b/core/codegen/tests/ui-fail/typed-uri-bad-type.rs index da02a35b..0452bc09 100644 --- a/core/codegen/tests/ui-fail/typed-uri-bad-type.rs +++ b/core/codegen/tests/ui-fail/typed-uri-bad-type.rs @@ -2,8 +2,6 @@ // normalize-stderr-test: "and \d+ others" -> "and $$N others" // normalize-stderr-test: "::: (.*)/core/http" -> "::: $$ROCKET/core/http" -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::http::RawStr; diff --git a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr index 8c8e9c5b..9612d3c2 100644 --- a/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail/typed-uri-bad-type.stderr @@ -1,7 +1,7 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:50:23 + --> $DIR/typed-uri-bad-type.rs:48:23 | -50 | uri!(simple: id = "hi"); +48 | uri!(simple: id = "hi"); | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` | = help: the following implementations were found: @@ -11,9 +11,9 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:53:18 + --> $DIR/typed-uri-bad-type.rs:51:18 | -53 | uri!(simple: "hello"); +51 | uri!(simple: "hello"); | ^^^^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` | = help: the following implementations were found: @@ -23,9 +23,9 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:56:23 + --> $DIR/typed-uri-bad-type.rs:54:23 | -56 | uri!(simple: id = 239239i64); +54 | uri!(simple: id = 239239i64); | ^^^^^^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `usize` | = help: the following implementations were found: @@ -35,15 +35,15 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:59:31 + --> $DIR/typed-uri-bad-type.rs:57:31 | -59 | uri!(not_uri_display: 10, S); +57 | uri!(not_uri_display: 10, S); | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:65:26 + --> $DIR/typed-uri-bad-type.rs:63:26 | -65 | uri!(optionals: id = Some(10), name = Ok("bob".into())); +63 | uri!(optionals: id = Some(10), name = Ok("bob".into())); | ^^^^^^^^ the trait `rocket::http::uri::FromUriParam>` is not implemented for `i32` | = help: the following implementations were found: @@ -53,9 +53,9 @@ error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam>` for `std::option::Option` error[E0277]: the trait bound `std::string::String: rocket::http::uri::FromUriParam>` is not satisfied - --> $DIR/typed-uri-bad-type.rs:65:43 + --> $DIR/typed-uri-bad-type.rs:63:43 | -65 | uri!(optionals: id = Some(10), name = Ok("bob".into())); +63 | uri!(optionals: id = Some(10), name = Ok("bob".into())); | ^^^^^^^^^^^^^^^^ the trait `rocket::http::uri::FromUriParam>` is not implemented for `std::string::String` | = help: the following implementations were found: @@ -67,9 +67,9 @@ error[E0277]: the trait bound `std::string::String: rocket::http::uri::FromUriPa = note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam>` for `std::result::Result` error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:69:20 + --> $DIR/typed-uri-bad-type.rs:67:20 | -69 | uri!(simple_q: "hi"); +67 | uri!(simple_q: "hi"); | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `isize` | = help: the following implementations were found: @@ -79,9 +79,9 @@ error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:72:25 + --> $DIR/typed-uri-bad-type.rs:70:25 | -72 | uri!(simple_q: id = "hi"); +70 | uri!(simple_q: id = "hi"); | ^^^^ the trait `rocket::http::uri::FromUriParam` is not implemented for `isize` | = help: the following implementations were found: @@ -91,53 +91,53 @@ error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:75:24 + --> $DIR/typed-uri-bad-type.rs:73:24 | -75 | uri!(other_q: 100, S); +73 | uri!(other_q: 100, S); | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:78:26 + --> $DIR/typed-uri-bad-type.rs:76:26 | -78 | uri!(other_q: rest = S, id = 100); +76 | uri!(other_q: rest = S, id = 100); | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` error[E0277]: the trait bound `S: rocket::http::uri::Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:42:29 + --> $DIR/typed-uri-bad-type.rs:40:29 | -42 | fn other_q(id: usize, rest: S) { } +40 | fn other_q(id: usize, rest: S) { } | ^ the trait `rocket::http::uri::Ignorable` is not implemented for `S` ... -81 | uri!(other_q: rest = _, id = 100); +79 | uri!(other_q: rest = _, id = 100); | ---------------------------------- in this macro invocation | - ::: $ROCKET/core/http/src/uri/uri_display.rs:469:40 + ::: $ROCKET/core/http/src/uri/uri_display.rs:465:40 | -469 | pub fn assert_ignorable>() { } +465 | pub fn assert_ignorable>() { } | ------------ required by this bound in `rocket::http::uri::assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable` is not satisfied - --> $DIR/typed-uri-bad-type.rs:42:16 + --> $DIR/typed-uri-bad-type.rs:40:16 | -42 | fn other_q(id: usize, rest: S) { } +40 | fn other_q(id: usize, rest: S) { } | ^^^^^ the trait `rocket::http::uri::Ignorable` is not implemented for `usize` ... -83 | uri!(other_q: rest = S, id = _); +81 | uri!(other_q: rest = S, id = _); | -------------------------------- in this macro invocation | - ::: $ROCKET/core/http/src/uri/uri_display.rs:469:40 + ::: $ROCKET/core/http/src/uri/uri_display.rs:465:40 | -469 | pub fn assert_ignorable>() { } +465 | pub fn assert_ignorable>() { } | ------------ required by this bound in `rocket::http::uri::assert_ignorable` | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam` is not satisfied - --> $DIR/typed-uri-bad-type.rs:83:26 + --> $DIR/typed-uri-bad-type.rs:81:26 | -83 | uri!(other_q: rest = S, id = _); +81 | uri!(other_q: rest = S, id = _); | ^ the trait `rocket::http::uri::FromUriParam` is not implemented for `S` error: aborting due to 13 previous errors diff --git a/core/codegen/tests/ui-fail/typed-uris-bad-params.rs b/core/codegen/tests/ui-fail/typed-uris-bad-params.rs index 2baf5be9..3dae1b9b 100644 --- a/core/codegen/tests/ui-fail/typed-uris-bad-params.rs +++ b/core/codegen/tests/ui-fail/typed-uris-bad-params.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use std::fmt; diff --git a/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr index 20ed1d0c..ba3bdb50 100644 --- a/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail/typed-uris-bad-params.stderr @@ -1,238 +1,238 @@ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:79:37 + --> $DIR/typed-uris-bad-params.rs:77:37 | -79 | uri!(optionals: id = 10, name = _); +77 | uri!(optionals: id = 10, name = _); | ^ error: path parameters cannot be ignored - --> $DIR/typed-uris-bad-params.rs:76:26 + --> $DIR/typed-uris-bad-params.rs:74:26 | -76 | uri!(optionals: id = _, name = "bob".into()); +74 | uri!(optionals: id = _, name = "bob".into()); | ^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:72:19 + --> $DIR/typed-uris-bad-params.rs:70:19 | -72 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters +70 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:72:29 + --> $DIR/typed-uris-bad-params.rs:70:29 | -72 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters +70 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters | ^^^^^^^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:67:19 + --> $DIR/typed-uris-bad-params.rs:65:19 | -67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters +65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:67:19 + --> $DIR/typed-uris-bad-params.rs:65:19 | -67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters +65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters | ^^^^^^^ help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:67:45 + --> $DIR/typed-uris-bad-params.rs:65:45 | -67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters +65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters | ^^ ^^ error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:64:19 + --> $DIR/typed-uris-bad-params.rs:62:19 | -64 | uri!(has_two: name = "hi"); //~ ERROR invalid parameters +62 | uri!(has_two: name = "hi"); //~ ERROR invalid parameters | ^^^^^^^^^^^ | = note: uri parameters are: id: i32, name: String = help: missing parameter: `id` error: invalid parameters for `has_two` route uri - --> $DIR/typed-uris-bad-params.rs:60:19 + --> $DIR/typed-uris-bad-params.rs:58:19 | -60 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters +58 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32, name: String = help: missing parameter: `name` help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:60:29 + --> $DIR/typed-uris-bad-params.rs:58:29 | -60 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters +58 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters | ^^ error: invalid parameters for `has_one_guarded` route uri - --> $DIR/typed-uris-bad-params.rs:57:27 + --> $DIR/typed-uris-bad-params.rs:55:27 | -57 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters +55 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:57:37 + --> $DIR/typed-uris-bad-params.rs:55:37 | -57 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters +55 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters | ^^^^^^^ error: invalid parameters for `has_one_guarded` route uri - --> $DIR/typed-uris-bad-params.rs:54:27 + --> $DIR/typed-uris-bad-params.rs:52:27 | -54 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters +52 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `cookies` - --> $DIR/typed-uris-bad-params.rs:54:27 + --> $DIR/typed-uris-bad-params.rs:52:27 | -54 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters +52 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters | ^^^^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:50:19 + --> $DIR/typed-uris-bad-params.rs:48:19 | -50 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters +48 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters | ^^^^^^^^^^^ | = note: uri parameters are: id: i32 = help: missing parameter: `id` help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:50:19 + --> $DIR/typed-uris-bad-params.rs:48:19 | -50 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters +48 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters | ^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:47:19 + --> $DIR/typed-uris-bad-params.rs:45:19 | -47 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters +45 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:47:29 + --> $DIR/typed-uris-bad-params.rs:45:29 | -47 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters +45 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:44:19 + --> $DIR/typed-uris-bad-params.rs:42:19 | -44 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters +42 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:44:29 + --> $DIR/typed-uris-bad-params.rs:42:29 | -44 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters +42 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:40:19 + --> $DIR/typed-uris-bad-params.rs:38:19 | -40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters +38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:40:19 + --> $DIR/typed-uris-bad-params.rs:38:19 | -40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters +38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters | ^^^^ ^^^ help: duplicate parameter: `id` - --> $DIR/typed-uris-bad-params.rs:40:51 + --> $DIR/typed-uris-bad-params.rs:38:51 | -40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters +38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters | ^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:37:19 + --> $DIR/typed-uris-bad-params.rs:35:19 | -37 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters +35 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameters: `name`, `age` - --> $DIR/typed-uris-bad-params.rs:37:19 + --> $DIR/typed-uris-bad-params.rs:35:19 | -37 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters +35 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters | ^^^^ ^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:34:19 + --> $DIR/typed-uris-bad-params.rs:32:19 | -34 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters +32 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:34:19 + --> $DIR/typed-uris-bad-params.rs:32:19 | -34 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters +32 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters | ^^^^ error: invalid parameters for `has_one` route uri - --> $DIR/typed-uris-bad-params.rs:31:19 + --> $DIR/typed-uris-bad-params.rs:29:19 | -31 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters +29 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters | ^^^^^^^^^^^^^^^^^^^^^ | = note: uri parameters are: id: i32 help: unknown parameter: `name` - --> $DIR/typed-uris-bad-params.rs:31:29 + --> $DIR/typed-uris-bad-params.rs:29:29 | -31 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters +29 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters | ^^^^ error: `has_two` route uri expects 2 parameters but 1 was supplied - --> $DIR/typed-uris-bad-params.rs:29:19 + --> $DIR/typed-uris-bad-params.rs:27:19 | -29 | uri!(has_two: 10); //~ ERROR expects 2 parameters but 1 +27 | uri!(has_two: 10); //~ ERROR expects 2 parameters but 1 | ^^ | = note: expected parameters: id: i32, name: String error: `has_two` route uri expects 2 parameters but 3 were supplied - --> $DIR/typed-uris-bad-params.rs:28:19 + --> $DIR/typed-uris-bad-params.rs:26:19 | -28 | uri!(has_two: 10, "hi", "there"); //~ ERROR expects 2 parameters but 3 +26 | uri!(has_two: 10, "hi", "there"); //~ ERROR expects 2 parameters but 3 | ^^^^^^^^^^^^^^^^^ | = note: expected parameters: id: i32, name: String error: `has_one_guarded` route uri expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:26:27 + --> $DIR/typed-uris-bad-params.rs:24:27 | -26 | uri!(has_one_guarded: "hi", 100); //~ ERROR expects 1 parameter but 2 +24 | uri!(has_one_guarded: "hi", 100); //~ ERROR expects 1 parameter but 2 | ^^^^^^^^^ | = note: expected parameter: id: i32 error: `has_one` route uri expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:25:19 + --> $DIR/typed-uris-bad-params.rs:23:19 | -25 | uri!(has_one: "Hello", 23, ); //~ ERROR expects 1 parameter but 2 +23 | uri!(has_one: "Hello", 23, ); //~ ERROR expects 1 parameter but 2 | ^^^^^^^^^^^^ | = note: expected parameter: id: i32 error: `has_one` route uri expects 1 parameter but 2 were supplied - --> $DIR/typed-uris-bad-params.rs:24:19 + --> $DIR/typed-uris-bad-params.rs:22:19 | -24 | uri!(has_one: 1, 23); //~ ERROR expects 1 parameter but 2 +22 | uri!(has_one: 1, 23); //~ ERROR expects 1 parameter but 2 | ^^^^^ | = note: expected parameter: id: i32 error: `has_one` route uri expects 1 parameter but 0 were supplied - --> $DIR/typed-uris-bad-params.rs:22:10 + --> $DIR/typed-uris-bad-params.rs:20:10 | -22 | uri!(has_one); //~ ERROR expects 1 parameter but 0 +20 | uri!(has_one); //~ ERROR expects 1 parameter but 0 | ^^^^^^^ | = note: expected parameter: id: i32 diff --git a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs index 0c22cc17..efee8948 100644 --- a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs +++ b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[post("//")] diff --git a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr index 13b42eea..035952af 100644 --- a/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail/typed-uris-invalid-syntax.stderr @@ -1,65 +1,65 @@ error: named and unnamed parameters cannot be mixed - --> $DIR/typed-uris-invalid-syntax.rs:9:18 + --> $DIR/typed-uris-invalid-syntax.rs:7:18 | -9 | uri!(simple: id = 100, "Hello"); //~ ERROR named and unnamed +7 | uri!(simple: id = 100, "Hello"); //~ ERROR named and unnamed | ^^^^^^^^^^^^^^^^^ error: named and unnamed parameters cannot be mixed - --> $DIR/typed-uris-invalid-syntax.rs:10:18 - | -10 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed - | ^^^^^^^^^^^^^^^^^ + --> $DIR/typed-uris-invalid-syntax.rs:8:18 + | +8 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed + | ^^^^^^^^^^^^^^^^^ error: expected `:` - --> $DIR/typed-uris-invalid-syntax.rs:11:16 - | -11 | uri!(simple,); //~ ERROR expected `:` - | ^ + --> $DIR/typed-uris-invalid-syntax.rs:9:16 + | +9 | uri!(simple,); //~ ERROR expected `:` + | ^ error: expected argument list after `:` - --> $DIR/typed-uris-invalid-syntax.rs:12:16 + --> $DIR/typed-uris-invalid-syntax.rs:10:16 | -12 | uri!(simple:); //~ ERROR argument list +10 | uri!(simple:); //~ ERROR argument list | ^ error: unexpected end of input: expected ',' followed by route path - --> $DIR/typed-uris-invalid-syntax.rs:13:10 + --> $DIR/typed-uris-invalid-syntax.rs:11:10 | -13 | uri!("/mount"); //~ ERROR route path +11 | uri!("/mount"); //~ ERROR route path | ^^^^^^^^ error: unexpected end of input, expected identifier - --> $DIR/typed-uris-invalid-syntax.rs:14:5 + --> $DIR/typed-uris-invalid-syntax.rs:12:5 | -14 | uri!("/mount",); //~ ERROR expected identifier +12 | uri!("/mount",); //~ ERROR expected identifier | ^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: invalid mount point; mount points must be static, absolute URIs: `/example` - --> $DIR/typed-uris-invalid-syntax.rs:15:10 + --> $DIR/typed-uris-invalid-syntax.rs:13:10 | -15 | uri!("mount", simple); //~ invalid mount point +13 | uri!("mount", simple); //~ invalid mount point | ^^^^^^^ error: invalid mount point; mount points must be static, absolute URIs: `/example` - --> $DIR/typed-uris-invalid-syntax.rs:16:10 + --> $DIR/typed-uris-invalid-syntax.rs:14:10 | -16 | uri!("/mount/", simple); //~ invalid mount point +14 | uri!("/mount/", simple); //~ invalid mount point | ^^^^^^^^^^^^^ error: unexpected end of input, call to `uri!` cannot be empty - --> $DIR/typed-uris-invalid-syntax.rs:17:5 + --> $DIR/typed-uris-invalid-syntax.rs:15:5 | -17 | uri!(); //~ unexpected end of input +15 | uri!(); //~ unexpected end of input | ^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected end of input, expected expression - --> $DIR/typed-uris-invalid-syntax.rs:18:5 + --> $DIR/typed-uris-invalid-syntax.rs:16:5 | -18 | uri!(simple: id = ); //~ expected expression +16 | uri!(simple: id = ); //~ expected expression | ^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail/uri_display.stderr b/core/codegen/tests/ui-fail/uri_display.stderr index ad52c626..9fa32284 100644 --- a/core/codegen/tests/ui-fail/uri_display.stderr +++ b/core/codegen/tests/ui-fail/uri_display.stderr @@ -137,9 +137,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not implemented for `Foo1` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -150,9 +150,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not implemented for `Foo1` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo1` @@ -164,9 +164,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay` is not implemented for `Foo1` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo1` @@ -178,9 +178,9 @@ error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not implemented for `Foo2` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -191,9 +191,9 @@ error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not implemented for `Foo2` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo2` @@ -205,9 +205,9 @@ error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay` is not implemented for `Foo2` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo2` @@ -219,9 +219,9 @@ error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not implemented for `Foo3` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -232,9 +232,9 @@ error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not implemented for `Foo3` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo3` @@ -246,9 +246,9 @@ error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay` is not implemented for `Foo3` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo3` @@ -260,9 +260,9 @@ error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not implemented for `Foo4` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -273,9 +273,9 @@ error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not implemented for `Foo4` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo4` @@ -287,9 +287,9 @@ error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay` is not implemented for `Foo4` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo4` @@ -301,9 +301,9 @@ error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not implemented for `Foo5` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -314,9 +314,9 @@ error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not implemented for `Foo5` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo5` @@ -328,9 +328,9 @@ error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay` is not implemented for `Foo5` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo5` @@ -342,9 +342,9 @@ error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not implemented for `Foo6` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -355,9 +355,9 @@ error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not implemented for `Foo6` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo6` @@ -369,9 +369,9 @@ error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay` is not implemented for `Foo6` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&mut Foo6` @@ -383,9 +383,9 @@ error[E0277]: the trait bound `Foo7: rocket::http::uri::UriDisplay` is not implemented for `Foo7` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -396,9 +396,9 @@ error[E0277]: the trait bound `Foo7: rocket::http::uri::UriDisplay` is not implemented for `Foo7` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo7` @@ -410,9 +410,9 @@ error[E0277]: the trait bound `Foo8: rocket::http::uri::UriDisplay` is not implemented for `Foo8` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -423,9 +423,9 @@ error[E0277]: the trait bound `Foo8: rocket::http::uri::UriDisplay` is not implemented for `Foo8` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo8` @@ -437,9 +437,9 @@ error[E0277]: the trait bound `Foo9: rocket::http::uri::UriDisplay` is not implemented for `Foo9` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -450,9 +450,9 @@ error[E0277]: the trait bound `Foo9: rocket::http::uri::UriDisplay` is not implemented for `Foo9` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo9` @@ -464,9 +464,9 @@ error[E0277]: the trait bound `Foo10: rocket::http::uri::UriDisplay` is not implemented for `Foo10` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) @@ -477,9 +477,9 @@ error[E0277]: the trait bound `Foo10: rocket::http::uri::UriDisplay` is not implemented for `Foo10` | - ::: $ROCKET/core/http/src/uri/from_uri_param.rs:196:18 + ::: $ROCKET/core/http/src/uri/from_uri_param.rs:195:18 | -196 | type Target: UriDisplay

; +195 | type Target: UriDisplay

; | ------------- required by this bound in `rocket::http::uri::FromUriParam` | = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay` for `&Foo10` diff --git a/core/codegen/tests/uri_display.rs b/core/codegen/tests/uri_display.rs index b51d716a..c1f41b8f 100644 --- a/core/codegen/tests/uri_display.rs +++ b/core/codegen/tests/uri_display.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::http::RawStr; diff --git a/core/http/src/cookies.rs b/core/http/src/cookies.rs index becd9ec3..35a8a5a4 100644 --- a/core/http/src/cookies.rs +++ b/core/http/src/cookies.rs @@ -54,7 +54,6 @@ mod key { /// a handler to retrieve the value of a "message" cookie. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::http::Cookies; /// @@ -74,7 +73,6 @@ mod key { /// [private cookie]: Cookies::add_private() /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// use rocket::http::Status; diff --git a/core/http/src/lib.rs b/core/http/src/lib.rs index fe951fa4..12c9308d 100644 --- a/core/http/src/lib.rs +++ b/core/http/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(proc_macro_hygiene)] #![recursion_limit="512"] #![warn(rust_2018_idioms)] diff --git a/core/http/src/uri/from_uri_param.rs b/core/http/src/uri/from_uri_param.rs index 6ad63bc6..416d3946 100644 --- a/core/http/src/uri/from_uri_param.rs +++ b/core/http/src/uri/from_uri_param.rs @@ -155,7 +155,6 @@ use crate::uri::{self, UriPart, UriDisplay}; /// With these implementations, the following typechecks: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use std::fmt; /// use rocket::http::RawStr; diff --git a/core/http/src/uri/uri_display.rs b/core/http/src/uri/uri_display.rs index d75c8dfc..565a0575 100644 --- a/core/http/src/uri/uri_display.rs +++ b/core/http/src/uri/uri_display.rs @@ -61,7 +61,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter}; /// the following route: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// #[get("/item/?")] /// fn get_item(id: i32, track: Option) { /* .. */ } @@ -70,7 +69,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter}; /// A URI for this route can be generated as follows: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type T = (); /// # #[get("/item/?")] @@ -236,7 +234,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter}; /// `UriDisplay` implementation is required. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::http::RawStr; /// use rocket::request::FromParam; @@ -434,7 +431,6 @@ impl, E> UriDisplay for Result { /// trait for the corresponding `UriPart`. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// #[get("/item/?")] /// fn get_item(id: i32, track: Option) { /* .. */ } diff --git a/core/lib/benches/format-routing.rs b/core/lib/benches/format-routing.rs index fdd5947a..2af66853 100644 --- a/core/lib/benches/format-routing.rs +++ b/core/lib/benches/format-routing.rs @@ -1,6 +1,4 @@ #![feature(test)] -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::config::{Environment, Config, LoggingLevel}; diff --git a/core/lib/benches/ranked-routing.rs b/core/lib/benches/ranked-routing.rs index 2ced31f9..900f26a5 100644 --- a/core/lib/benches/ranked-routing.rs +++ b/core/lib/benches/ranked-routing.rs @@ -1,6 +1,4 @@ #![feature(test)] -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::config::{Environment, Config, LoggingLevel}; diff --git a/core/lib/benches/simple-routing.rs b/core/lib/benches/simple-routing.rs index 4ef43b4b..03d7734f 100644 --- a/core/lib/benches/simple-routing.rs +++ b/core/lib/benches/simple-routing.rs @@ -1,6 +1,4 @@ #![feature(test)] -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::config::{Environment, Config, LoggingLevel}; diff --git a/core/lib/build.rs b/core/lib/build.rs index 0d575016..5c70dd71 100644 --- a/core/lib/build.rs +++ b/core/lib/build.rs @@ -4,8 +4,8 @@ use yansi::{Paint, Color::{Red, Yellow, Blue}}; // Specifies the minimum nightly version needed to compile Rocket. -const MIN_DATE: &'static str = "2019-11-24"; -const MIN_VERSION: &'static str = "1.41.0-nightly"; +const MIN_DATE: &'static str = "2020-05-20"; +const MIN_VERSION: &'static str = "1.45.0-nightly"; macro_rules! err { ($version:expr, $date:expr, $msg:expr) => ( diff --git a/core/lib/src/catcher.rs b/core/lib/src/catcher.rs index f750d474..2997866d 100644 --- a/core/lib/src/catcher.rs +++ b/core/lib/src/catcher.rs @@ -36,7 +36,6 @@ use yansi::Color::*; /// declared using the `catch` decorator, as follows: /// /// ```rust,no_run -/// #![feature(proc_macro_hygiene)] /// /// #[macro_use] extern crate rocket; /// diff --git a/core/lib/src/data/data.rs b/core/lib/src/data/data.rs index 90d6dc24..04f32f51 100644 --- a/core/lib/src/data/data.rs +++ b/core/lib/src/data/data.rs @@ -20,7 +20,6 @@ const PEEK_BYTES: usize = 512; /// specifying the `data = ""` route parameter as follows: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type DataGuard = rocket::data::Data; /// #[post("/submit", data = "")] diff --git a/core/lib/src/data/from_data.rs b/core/lib/src/data/from_data.rs index 54e5dcef..1ecf0010 100644 --- a/core/lib/src/data/from_data.rs +++ b/core/lib/src/data/from_data.rs @@ -144,7 +144,6 @@ pub type FromDataFuture<'fut, T, E> = BoxFuture<'fut, Outcome>; /// if the guard returns successfully. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type DataGuard = rocket::data::Data; /// #[post("/submit", data = "")] @@ -191,7 +190,6 @@ pub type FromDataFuture<'fut, T, E> = BoxFuture<'fut, Outcome>; /// `String` (an `&str`). /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[derive(Debug)] /// # struct Name<'a> { first: &'a str, last: &'a str, } @@ -444,7 +442,6 @@ impl<'a> FromData<'a> for Data { /// that you can retrieve it directly from a client's request body: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type Person = rocket::data::Data; /// #[post("/person", data = "")] @@ -456,7 +453,6 @@ impl<'a> FromData<'a> for Data { /// A `FromDataSimple` implementation allowing this looks like: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # #[derive(Debug)] diff --git a/core/lib/src/handler.rs b/core/lib/src/handler.rs index 1d7b573f..ea2c88d0 100644 --- a/core/lib/src/handler.rs +++ b/core/lib/src/handler.rs @@ -94,7 +94,6 @@ pub type HandlerFuture<'r> = BoxFuture<'r, Outcome<'r>>; /// managed state and a static route, as follows: /// /// ```rust,no_run -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # #[derive(Copy, Clone)] diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index 79a19fcb..518bd897 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #![recursion_limit="256"] #![doc(html_root_url = "https://api.rocket.rs/v0.5")] @@ -47,8 +45,6 @@ //! Then, add the following to the top of your `main.rs` file: //! //! ```rust -//! #![feature(proc_macro_hygiene)] -//! //! #[macro_use] extern crate rocket; //! # #[get("/")] fn hello() { } //! # fn main() { rocket::ignite().mount("/", routes![hello]); } @@ -58,7 +54,6 @@ //! write Rocket applications. Here's a simple example to get you started: //! //! ```rust,no_run -//! #![feature(proc_macro_hygiene)] //! //! #[macro_use] extern crate rocket; //! diff --git a/core/lib/src/local/mod.rs b/core/lib/src/local/mod.rs index 85df62eb..93a60bbe 100644 --- a/core/lib/src/local/mod.rs +++ b/core/lib/src/local/mod.rs @@ -34,8 +34,6 @@ //! world!" application, with testing. //! //! ```rust -//! #![feature(proc_macro_hygiene)] -//! //! #[macro_use] extern crate rocket; //! //! #[get("/")] diff --git a/core/lib/src/outcome.rs b/core/lib/src/outcome.rs index 642afdf9..80452f62 100644 --- a/core/lib/src/outcome.rs +++ b/core/lib/src/outcome.rs @@ -621,7 +621,6 @@ impl<'a, S: Send + 'a, E: Send + 'a, F: Send + 'a> Outcome { /// ## Example /// /// ```rust,no_run -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use std::sync::atomic::{AtomicUsize, Ordering}; /// use rocket::request::{self, Request, FromRequest, State}; diff --git a/core/lib/src/request/form/error.rs b/core/lib/src/request/form/error.rs index 086be805..97458503 100644 --- a/core/lib/src/request/form/error.rs +++ b/core/lib/src/request/form/error.rs @@ -50,7 +50,6 @@ pub enum FormDataError<'f, E> { /// # Example /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::{Form, FormError, FormDataError}; /// diff --git a/core/lib/src/request/form/form.rs b/core/lib/src/request/form/form.rs index 079fb680..02e07b6b 100644 --- a/core/lib/src/request/form/form.rs +++ b/core/lib/src/request/form/form.rs @@ -32,7 +32,6 @@ use crate::http::{Status, uri::{Query, FromUriParam}}; /// implements the `FromForm` trait: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::Form; /// use rocket::http::RawStr; @@ -68,7 +67,6 @@ use crate::http::{Status, uri::{Query, FromUriParam}}; /// A handler that handles a form of this type can similarly by written: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #![allow(deprecated, unused_attributes)] /// # #[macro_use] extern crate rocket; /// # use rocket::request::Form; @@ -121,7 +119,6 @@ impl Form { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::Form; /// diff --git a/core/lib/src/request/form/from_form.rs b/core/lib/src/request/form/from_form.rs index 08c55985..5ecd0fb0 100644 --- a/core/lib/src/request/form/from_form.rs +++ b/core/lib/src/request/form/from_form.rs @@ -13,7 +13,6 @@ use crate::request::FormItems; /// validation. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #![allow(deprecated, dead_code, unused_attributes)] /// # #[macro_use] extern crate rocket; /// #[derive(FromForm)] @@ -30,7 +29,6 @@ use crate::request::FormItems; /// data via the `data` parameter and `Form` type. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #![allow(deprecated, dead_code, unused_attributes)] /// # #[macro_use] extern crate rocket; /// # use rocket::request::Form; diff --git a/core/lib/src/request/form/from_form_value.rs b/core/lib/src/request/form/from_form_value.rs index 477639d2..c6e94af5 100644 --- a/core/lib/src/request/form/from_form_value.rs +++ b/core/lib/src/request/form/from_form_value.rs @@ -43,7 +43,6 @@ use crate::http::RawStr; /// according to its target type: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type Size = String; /// #[get("/item?&")] diff --git a/core/lib/src/request/form/lenient.rs b/core/lib/src/request/form/lenient.rs index d3796bb2..87d76052 100644 --- a/core/lib/src/request/form/lenient.rs +++ b/core/lib/src/request/form/lenient.rs @@ -31,7 +31,6 @@ use crate::http::uri::{Query, FromUriParam}; /// handler: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::LenientForm; /// @@ -67,7 +66,6 @@ impl LenientForm { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::LenientForm; /// diff --git a/core/lib/src/request/from_request.rs b/core/lib/src/request/from_request.rs index e3600c0e..0c846be2 100644 --- a/core/lib/src/request/from_request.rs +++ b/core/lib/src/request/from_request.rs @@ -78,7 +78,6 @@ impl IntoOutcome for Result { /// guard. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use rocket::http::Method; /// # type A = Method; type B = Method; type C = Method; type T = (); @@ -188,7 +187,6 @@ impl IntoOutcome for Result { /// `sensitive` handler. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// use rocket::Outcome; @@ -244,7 +242,6 @@ impl IntoOutcome for Result { /// routes (`admin_dashboard` and `user_dashboard`): /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[cfg(feature = "private-cookies")] mod inner { /// # use rocket::outcome::{IntoOutcome, Outcome}; @@ -309,7 +306,6 @@ impl IntoOutcome for Result { /// used, as illustrated below: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # #[cfg(feature = "private-cookies")] mod inner { /// # use rocket::outcome::{IntoOutcome, Outcome}; diff --git a/core/lib/src/request/param.rs b/core/lib/src/request/param.rs index a1d3eaa6..457726ff 100644 --- a/core/lib/src/request/param.rs +++ b/core/lib/src/request/param.rs @@ -19,7 +19,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}}; /// handler for the dynamic `"/"` path: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// #[get("/")] /// fn hello(id: usize) -> String { @@ -54,7 +53,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}}; /// parameter as follows: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use rocket::http::RawStr; /// #[get("/")] @@ -172,7 +170,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}}; /// dynamic path segment: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # use rocket::request::FromParam; /// # use rocket::http::RawStr; diff --git a/core/lib/src/request/query.rs b/core/lib/src/request/query.rs index 90f06a96..c1b95a02 100644 --- a/core/lib/src/request/query.rs +++ b/core/lib/src/request/query.rs @@ -8,7 +8,6 @@ use crate::request::{FormItems, FormItem, Form, LenientForm, FromForm}; /// generation for every trailing query parameter, `` below: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # use rocket::request::Form; @@ -82,7 +81,6 @@ impl<'q> Iterator for Query<'q> { /// route: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::request::Form; /// diff --git a/core/lib/src/request/state.rs b/core/lib/src/request/state.rs index dd83556e..54b696e4 100644 --- a/core/lib/src/request/state.rs +++ b/core/lib/src/request/state.rs @@ -22,7 +22,6 @@ use crate::http::Status; /// following example does just this: /// /// ```rust,no_run -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::State; /// @@ -82,7 +81,6 @@ use crate::http::Status; /// [`State::from()`] static method: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::State; /// diff --git a/core/lib/src/response/debug.rs b/core/lib/src/response/debug.rs index 47a8e13d..354d3e1f 100644 --- a/core/lib/src/response/debug.rs +++ b/core/lib/src/response/debug.rs @@ -17,7 +17,6 @@ use yansi::Paint; /// automatically: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// use std::io; /// /// use tokio::io::AsyncReadExt; @@ -38,7 +37,6 @@ use yansi::Paint; /// [`Result::map_err()`]: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// use std::string::FromUtf8Error; /// /// # use rocket::get; diff --git a/core/lib/src/response/flash.rs b/core/lib/src/response/flash.rs index 666edd0f..46480b57 100644 --- a/core/lib/src/response/flash.rs +++ b/core/lib/src/response/flash.rs @@ -48,7 +48,6 @@ const FLASH_COOKIE_DELIM: char = ':'; /// request and response sides. /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::response::{Flash, Redirect}; /// use rocket::request::FlashMessage; diff --git a/core/lib/src/response/redirect.rs b/core/lib/src/response/redirect.rs index 730fd01b..49dbbc24 100644 --- a/core/lib/src/response/redirect.rs +++ b/core/lib/src/response/redirect.rs @@ -26,7 +26,6 @@ use crate::http::Status; /// a route, _always_ use [`uri!`] to construct a valid [`Origin`]: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::response::Redirect; /// diff --git a/core/lib/src/response/responder.rs b/core/lib/src/response/responder.rs index 6058f783..53b3d858 100644 --- a/core/lib/src/response/responder.rs +++ b/core/lib/src/response/responder.rs @@ -11,7 +11,6 @@ use crate::request::Request; /// as illustrated below with `T`: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # type T = (); /// # @@ -152,7 +151,6 @@ use crate::request::Request; /// following `Responder` implementation accomplishes this: /// /// ```rust -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// # #[derive(Debug)] diff --git a/core/lib/src/response/status.rs b/core/lib/src/response/status.rs index 62cfd3c8..a5e66976 100644 --- a/core/lib/src/response/status.rs +++ b/core/lib/src/response/status.rs @@ -41,7 +41,6 @@ impl<'r, R> Created { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # use rocket::{get, routes, local::blocking::Client}; /// use rocket::response::status; /// @@ -70,7 +69,6 @@ impl<'r, R> Created { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # use rocket::{get, routes, local::blocking::Client}; /// use rocket::response::status; /// @@ -104,7 +102,6 @@ impl<'r, R> Created { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # use rocket::{get, routes, local::blocking::Client}; /// use rocket::response::status; /// diff --git a/core/lib/src/rocket.rs b/core/lib/src/rocket.rs index 7effb6ea..d6a597e4 100644 --- a/core/lib/src/rocket.rs +++ b/core/lib/src/rocket.rs @@ -686,7 +686,6 @@ impl Rocket { /// dispatched to the `hi` route. /// /// ```rust,no_run - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// #[get("/world")] @@ -740,7 +739,6 @@ impl Rocket { /// # Examples /// /// ```rust,no_run - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::Request; /// @@ -782,7 +780,6 @@ impl Rocket { /// # Example /// /// ```rust,no_run - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::State; /// @@ -820,7 +817,6 @@ impl Rocket { /// # Example /// /// ```rust,no_run - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::Rocket; /// use rocket::fairing::AdHoc; @@ -907,7 +903,6 @@ impl Rocket { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # use std::{thread, time::Duration}; /// # /// # rocket::async_test(async { @@ -1069,7 +1064,6 @@ impl Cargo { /// # Example /// /// ```rust - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::Rocket; /// use rocket::fairing::AdHoc; @@ -1128,7 +1122,6 @@ impl Cargo { /// # Example /// /// ```rust,no_run - /// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// use rocket::Rocket; /// use rocket::fairing::AdHoc; diff --git a/core/lib/src/shutdown.rs b/core/lib/src/shutdown.rs index 6d87ad9e..5c8d1129 100644 --- a/core/lib/src/shutdown.rs +++ b/core/lib/src/shutdown.rs @@ -13,7 +13,6 @@ use tokio::sync::mpsc; /// # Example /// /// ```rust,no_run -/// # #![feature(proc_macro_hygiene)] /// # #[macro_use] extern crate rocket; /// # /// use rocket::shutdown::ShutdownHandle; diff --git a/core/lib/tests/absolute-uris-okay-issue-443.rs b/core/lib/tests/absolute-uris-okay-issue-443.rs index 3c8035dd..8bd1f4ad 100644 --- a/core/lib/tests/absolute-uris-okay-issue-443.rs +++ b/core/lib/tests/absolute-uris-okay-issue-443.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::response::Redirect; diff --git a/core/lib/tests/catcher-cookies-1213.rs b/core/lib/tests/catcher-cookies-1213.rs index e5fe28e2..a733927d 100644 --- a/core/lib/tests/catcher-cookies-1213.rs +++ b/core/lib/tests/catcher-cookies-1213.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::Request; diff --git a/core/lib/tests/conditionally-set-server-header-996.rs b/core/lib/tests/conditionally-set-server-header-996.rs index 0a77ad6d..a8c8cd16 100644 --- a/core/lib/tests/conditionally-set-server-header-996.rs +++ b/core/lib/tests/conditionally-set-server-header-996.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::Response; diff --git a/core/lib/tests/derive-reexports.rs b/core/lib/tests/derive-reexports.rs index 596fc14d..f63d6d9f 100644 --- a/core/lib/tests/derive-reexports.rs +++ b/core/lib/tests/derive-reexports.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - use rocket; use rocket::{get, routes}; diff --git a/core/lib/tests/fairing_before_head_strip-issue-546.rs b/core/lib/tests/fairing_before_head_strip-issue-546.rs index c7e25128..fa8a0f01 100644 --- a/core/lib/tests/fairing_before_head_strip-issue-546.rs +++ b/core/lib/tests/fairing_before_head_strip-issue-546.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; const RESPONSE_STRING: &'static str = "This is the body. Hello, world!"; diff --git a/core/lib/tests/flash-lazy-removes-issue-466.rs b/core/lib/tests/flash-lazy-removes-issue-466.rs index f0113e9b..748b96bd 100644 --- a/core/lib/tests/flash-lazy-removes-issue-466.rs +++ b/core/lib/tests/flash-lazy-removes-issue-466.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::FlashMessage; diff --git a/core/lib/tests/form_method-issue-45.rs b/core/lib/tests/form_method-issue-45.rs index edf7340a..8c6eaed6 100644 --- a/core/lib/tests/form_method-issue-45.rs +++ b/core/lib/tests/form_method-issue-45.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::Form; diff --git a/core/lib/tests/form_value_decoding-issue-82.rs b/core/lib/tests/form_value_decoding-issue-82.rs index 29e2281a..61db2c7a 100644 --- a/core/lib/tests/form_value_decoding-issue-82.rs +++ b/core/lib/tests/form_value_decoding-issue-82.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::Form; diff --git a/core/lib/tests/head_handling.rs b/core/lib/tests/head_handling.rs index 0775c27c..22940ecf 100644 --- a/core/lib/tests/head_handling.rs +++ b/core/lib/tests/head_handling.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::{http::Status, response::content}; diff --git a/core/lib/tests/limits.rs b/core/lib/tests/limits.rs index ae64e3c1..067d1230 100644 --- a/core/lib/tests/limits.rs +++ b/core/lib/tests/limits.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::Form; diff --git a/core/lib/tests/local-request-content-type-issue-505.rs b/core/lib/tests/local-request-content-type-issue-505.rs index f35b2c05..4ef1b66a 100644 --- a/core/lib/tests/local-request-content-type-issue-505.rs +++ b/core/lib/tests/local-request-content-type-issue-505.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::Outcome::*; diff --git a/core/lib/tests/local_request_private_cookie-issue-368.rs b/core/lib/tests/local_request_private_cookie-issue-368.rs index 6f5d4551..ee7562ee 100644 --- a/core/lib/tests/local_request_private_cookie-issue-368.rs +++ b/core/lib/tests/local_request_private_cookie-issue-368.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] #[cfg(feature = "private-cookies")] extern crate rocket; diff --git a/core/lib/tests/nested-fairing-attaches.rs b/core/lib/tests/nested-fairing-attaches.rs index 79819876..9ae736ad 100644 --- a/core/lib/tests/nested-fairing-attaches.rs +++ b/core/lib/tests/nested-fairing-attaches.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/core/lib/tests/precise-content-type-matching.rs b/core/lib/tests/precise-content-type-matching.rs index bfaa4df3..bc44bcdf 100644 --- a/core/lib/tests/precise-content-type-matching.rs +++ b/core/lib/tests/precise-content-type-matching.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[post("/", format = "application/json")] diff --git a/core/lib/tests/redirect_from_catcher-issue-113.rs b/core/lib/tests/redirect_from_catcher-issue-113.rs index ff1cc3d2..62978bf3 100644 --- a/core/lib/tests/redirect_from_catcher-issue-113.rs +++ b/core/lib/tests/redirect_from_catcher-issue-113.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::response::Redirect; diff --git a/core/lib/tests/responder_lifetime-issue-345.rs b/core/lib/tests/responder_lifetime-issue-345.rs index 8e797918..aef958e8 100644 --- a/core/lib/tests/responder_lifetime-issue-345.rs +++ b/core/lib/tests/responder_lifetime-issue-345.rs @@ -1,4 +1,3 @@ -#![feature(proc_macro_hygiene)] #![allow(dead_code)] // This test is only here so that we can ensure it compiles. #[macro_use] extern crate rocket; diff --git a/core/lib/tests/route_guard.rs b/core/lib/tests/route_guard.rs index b39ea882..ce6e8ea5 100644 --- a/core/lib/tests/route_guard.rs +++ b/core/lib/tests/route_guard.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use std::path::{Path, PathBuf}; diff --git a/core/lib/tests/segments-issues-41-86.rs b/core/lib/tests/segments-issues-41-86.rs index 5a202c35..bfbccff5 100644 --- a/core/lib/tests/segments-issues-41-86.rs +++ b/core/lib/tests/segments-issues-41-86.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::http::uri::Segments; diff --git a/core/lib/tests/strict_and_lenient_forms.rs b/core/lib/tests/strict_and_lenient_forms.rs index 65c874a8..4b2d4a0d 100644 --- a/core/lib/tests/strict_and_lenient_forms.rs +++ b/core/lib/tests/strict_and_lenient_forms.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::{Form, LenientForm}; diff --git a/core/lib/tests/uri-percent-encoding-issue-808.rs b/core/lib/tests/uri-percent-encoding-issue-808.rs index 2ce6886c..eb0dbb05 100644 --- a/core/lib/tests/uri-percent-encoding-issue-808.rs +++ b/core/lib/tests/uri-percent-encoding-issue-808.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::response::Redirect; diff --git a/examples/config/tests/development.rs b/examples/config/tests/development.rs index 1b5753bc..6b809328 100644 --- a/examples/config/tests/development.rs +++ b/examples/config/tests/development.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; mod common; diff --git a/examples/config/tests/production.rs b/examples/config/tests/production.rs index 7208a7a4..2210e3ae 100644 --- a/examples/config/tests/production.rs +++ b/examples/config/tests/production.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; mod common; diff --git a/examples/config/tests/staging.rs b/examples/config/tests/staging.rs index fc88fee8..8250baa9 100644 --- a/examples/config/tests/staging.rs +++ b/examples/config/tests/staging.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; mod common; diff --git a/examples/content_types/src/main.rs b/examples/content_types/src/main.rs index ce984471..f5e3a779 100644 --- a/examples/content_types/src/main.rs +++ b/examples/content_types/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate serde_derive; diff --git a/examples/cookies/src/main.rs b/examples/cookies/src/main.rs index d46b2fb8..85be9074 100644 --- a/examples/cookies/src/main.rs +++ b/examples/cookies/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] diff --git a/examples/errors/src/main.rs b/examples/errors/src/main.rs index 228dc692..6f032563 100644 --- a/examples/errors/src/main.rs +++ b/examples/errors/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/fairings/src/main.rs b/examples/fairings/src/main.rs index c15e30d4..5a647c9f 100644 --- a/examples/fairings/src/main.rs +++ b/examples/fairings/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use std::io::Cursor; diff --git a/examples/form_kitchen_sink/src/main.rs b/examples/form_kitchen_sink/src/main.rs index c2c771fc..0490a081 100644 --- a/examples/form_kitchen_sink/src/main.rs +++ b/examples/form_kitchen_sink/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::{Form, FormError, FormDataError}; diff --git a/examples/form_validation/src/main.rs b/examples/form_validation/src/main.rs index b43cce42..0eaf434e 100644 --- a/examples/form_validation/src/main.rs +++ b/examples/form_validation/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/handlebars_templates/src/main.rs b/examples/handlebars_templates/src/main.rs index abf3879d..0dd49b38 100644 --- a/examples/handlebars_templates/src/main.rs +++ b/examples/handlebars_templates/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate serde_derive; diff --git a/examples/hello_person/src/main.rs b/examples/hello_person/src/main.rs index b70c560a..2216de1e 100644 --- a/examples/hello_person/src/main.rs +++ b/examples/hello_person/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/json/src/main.rs b/examples/json/src/main.rs index 930d4d58..04e44586 100644 --- a/examples/json/src/main.rs +++ b/examples/json/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate rocket_contrib; #[macro_use] extern crate serde_derive; diff --git a/examples/managed_queue/src/main.rs b/examples/managed_queue/src/main.rs index 7c6edc5a..e30744a8 100644 --- a/examples/managed_queue/src/main.rs +++ b/examples/managed_queue/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/msgpack/src/main.rs b/examples/msgpack/src/main.rs index c4f63fb3..3aee4986 100644 --- a/examples/msgpack/src/main.rs +++ b/examples/msgpack/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate serde_derive; diff --git a/examples/optional_redirect/src/main.rs b/examples/optional_redirect/src/main.rs index a4b167c5..a80cfcdd 100644 --- a/examples/optional_redirect/src/main.rs +++ b/examples/optional_redirect/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] diff --git a/examples/pastebin/src/main.rs b/examples/pastebin/src/main.rs index e3179a05..34e95597 100644 --- a/examples/pastebin/src/main.rs +++ b/examples/pastebin/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; mod paste_id; diff --git a/examples/query_params/src/main.rs b/examples/query_params/src/main.rs index 98b56b86..edc296e8 100644 --- a/examples/query_params/src/main.rs +++ b/examples/query_params/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/ranking/src/main.rs b/examples/ranking/src/main.rs index 83c2d7dd..f1017a5a 100644 --- a/examples/ranking/src/main.rs +++ b/examples/ranking/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::http::RawStr; diff --git a/examples/raw_sqlite/src/main.rs b/examples/raw_sqlite/src/main.rs index 79211e75..6ba2b587 100644 --- a/examples/raw_sqlite/src/main.rs +++ b/examples/raw_sqlite/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/raw_upload/src/main.rs b/examples/raw_upload/src/main.rs index 5e493d78..8d1a9f3a 100644 --- a/examples/raw_upload/src/main.rs +++ b/examples/raw_upload/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/redirect/src/main.rs b/examples/redirect/src/main.rs index c6cb01e6..68b9398a 100644 --- a/examples/redirect/src/main.rs +++ b/examples/redirect/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/request_guard/src/main.rs b/examples/request_guard/src/main.rs index 8ec3d2d0..85f44093 100644 --- a/examples/request_guard/src/main.rs +++ b/examples/request_guard/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use rocket::request::{self, Request, FromRequest}; diff --git a/examples/request_local_state/src/main.rs b/examples/request_local_state/src/main.rs index 30d28e79..0ec1f959 100644 --- a/examples/request_local_state/src/main.rs +++ b/examples/request_local_state/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/examples/session/src/main.rs b/examples/session/src/main.rs index cac74831..761512eb 100644 --- a/examples/session/src/main.rs +++ b/examples/session/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/state/src/main.rs b/examples/state/src/main.rs index b558458f..a65d3fc9 100644 --- a/examples/state/src/main.rs +++ b/examples/state/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/stream/src/main.rs b/examples/stream/src/main.rs index 2fec56dd..75e2f580 100644 --- a/examples/stream/src/main.rs +++ b/examples/stream/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/tera_templates/src/main.rs b/examples/tera_templates/src/main.rs index 8692be09..baae1e17 100644 --- a/examples/tera_templates/src/main.rs +++ b/examples/tera_templates/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate serde_derive; diff --git a/examples/testing/src/main.rs b/examples/testing/src/main.rs index 8ca403de..d69f8710 100644 --- a/examples/testing/src/main.rs +++ b/examples/testing/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; mod async_required; diff --git a/examples/tls/src/main.rs b/examples/tls/src/main.rs index 429f7479..b43131ce 100644 --- a/examples/tls/src/main.rs +++ b/examples/tls/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[cfg(test)] mod tests; diff --git a/examples/todo/src/main.rs b/examples/todo/src/main.rs index 06bb6cbd..2ad4efba 100644 --- a/examples/todo/src/main.rs +++ b/examples/todo/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate diesel; #[macro_use] extern crate diesel_migrations; diff --git a/examples/uuid/src/main.rs b/examples/uuid/src/main.rs index 09ce4d30..18f048c1 100644 --- a/examples/uuid/src/main.rs +++ b/examples/uuid/src/main.rs @@ -1,5 +1,3 @@ -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[macro_use] extern crate lazy_static; diff --git a/site/guide/10-pastebin.md b/site/guide/10-pastebin.md index e6b906fb..98a9c40f 100644 --- a/site/guide/10-pastebin.md +++ b/site/guide/10-pastebin.md @@ -50,8 +50,6 @@ And finally, create a skeleton Rocket application to work off of in `src/main.rs`: ```rust -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[rocket::launch] @@ -108,7 +106,6 @@ Remember that routes first need to be mounted before Rocket dispatches requests to them. To mount the `index` route, modify the main function so that it reads: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/")] fn index() { } @@ -281,7 +278,6 @@ async fn upload(paste: Data) -> Result> { Ensure that the route is mounted at the root path: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/")] fn index() {} @@ -343,7 +339,6 @@ async fn retrieve(id: &RawStr) -> Option { Make sure that the route is mounted at the root path: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/")] fn index() {} diff --git a/site/guide/2-getting-started.md b/site/guide/2-getting-started.md index 6ae2a71a..28347bd7 100644 --- a/site/guide/2-getting-started.md +++ b/site/guide/2-getting-started.md @@ -57,8 +57,6 @@ Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!` program, reproduced below: ```rust -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[get("/")] diff --git a/site/guide/3-overview.md b/site/guide/3-overview.md index eaca1b6a..55e2379b 100644 --- a/site/guide/3-overview.md +++ b/site/guide/3-overview.md @@ -62,7 +62,6 @@ handler, with the set of parameters to match against. A complete route declaration looks like this: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; #[get("/world")] // <- route attribute @@ -84,7 +83,6 @@ routing and error handling. Before Rocket can dispatch requests to a route, the route needs to be _mounted_: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/world")] @@ -115,7 +113,6 @@ When a route is declared inside a module other than the root, you may find yourself with unexpected errors when mounting: ```rust,compile_fail -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; mod other { @@ -143,7 +140,6 @@ into the name of a structure generated by Rocket's code generation. The solution is to refer to the route using a namespaced path instead: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/")] pub fn hello() {} @@ -163,8 +159,6 @@ We typically use `#[rocket::launch]`, which generates a `main` function. Our complete _Hello, world!_ application thus looks like: ```rust -#![feature(proc_macro_hygiene)] - #[macro_use] extern crate rocket; #[get("/world")] @@ -178,11 +172,9 @@ fn rocket() -> rocket::Rocket { } ``` -Note the `#![feature]` line: this tells Rust that we're opting in to compiler -features available in the nightly release channel. This line **must** be in the -crate root, typically `main.rs`. We've also imported the `rocket` crate and all -of its macros into our namespace via `#[macro_use] extern crate rocket`. -Finally, we call the `launch` method in the `main` function. +We've imported the `rocket` crate and all of its macros into our namespace via +`#[macro_use] extern crate rocket`. Finally, we call the `launch` method in the +`main` function. Running the application, the console shows: diff --git a/site/guide/4-requests.md b/site/guide/4-requests.md index d6d53130..698fa9a2 100644 --- a/site/guide/4-requests.md +++ b/site/guide/4-requests.md @@ -208,7 +208,6 @@ be manually set with the `rank` attribute. To illustrate, consider the following routes: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use rocket::http::RawStr; @@ -287,7 +286,6 @@ Query segments can be declared static or dynamic in much the same way as path segments: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} @@ -422,7 +420,6 @@ For instance, the following dummy handler makes use of three request guards, named in the route attribute. ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} @@ -451,7 +448,6 @@ headers, you might create an `ApiKey` type that implements `FromRequest` and then use it as a request guard: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} # type ApiKey = rocket::http::Method; @@ -533,7 +529,6 @@ following three routes, each leading to an administrative control panel at `/admin`: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} @@ -614,7 +609,6 @@ methods are suffixed with `_private`. These methods are: [`get_private`], [`add_private`], and [`remove_private`]. An example of their usage is below: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} @@ -809,7 +803,6 @@ an argument in the handler. The argument's type must implement the [`FromData`] trait. It looks like this, where `T` is assumed to implement `FromData`: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # type T = rocket::data::Data; @@ -1149,7 +1142,6 @@ mounting a route: call the [`register()`] method with a list of catchers via the looks like: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use rocket::Request; diff --git a/site/guide/5-responses.md b/site/guide/5-responses.md index 082ea2d0..5d1a3269 100644 --- a/site/guide/5-responses.md +++ b/site/guide/5-responses.md @@ -396,7 +396,6 @@ fairings. To attach the template fairing, simply call `.attach(Template::fairing())` on an instance of `Rocket` as follows: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use rocket_contrib::templates::Template; @@ -467,7 +466,6 @@ fn person(name: String, age: Option) { /* .. */ } URIs to `person` can be created as follows: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/person/?")] @@ -534,7 +532,6 @@ in the query part of a URI, derive using [`UriDisplayQuery`]. As an example, consider the following form structure and route: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # fn main() {} @@ -556,7 +553,6 @@ automatically generated, allowing for URIs to `add_user` to be generated using `uri!`: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use rocket::http::RawStr; @@ -630,7 +626,6 @@ Conversions _nest_. For instance, a value of type `T` can be supplied when a value of type `Option>` is expected: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use rocket::http::RawStr; diff --git a/site/guide/8-testing.md b/site/guide/8-testing.md index e6a2f469..f238828b 100644 --- a/site/guide/8-testing.md +++ b/site/guide/8-testing.md @@ -82,7 +82,6 @@ These methods are typically used in combination with the `assert_eq!` or `assert!` macros as follows: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # use std::io::Cursor; @@ -117,7 +116,6 @@ To solidify an intuition for how Rocket applications are tested, we walk through how to test the "Hello, world!" application below: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; #[get("/")] @@ -192,7 +190,6 @@ Here, we want to ensure two things: We do this by checking the `Response` object directly: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; # #[get("/")] @@ -212,7 +209,6 @@ assert_eq!(response.into_string(), Some("Hello, world!".into())); That's it! Altogether, this looks like: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; #[get("/")] diff --git a/site/guide/9-configuration.md b/site/guide/9-configuration.md index be082bba..8660ca28 100644 --- a/site/guide/9-configuration.md +++ b/site/guide/9-configuration.md @@ -189,7 +189,6 @@ The following code will: 3. Retrieve the parameter in an `assets` route via the `State` guard. ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; use std::path::{Path, PathBuf}; @@ -256,7 +255,6 @@ In addition to using environment variables or a config file, Rocket can also be configured using the [`rocket::custom()`] method and [`ConfigBuilder`]: ```rust -# #![feature(proc_macro_hygiene)] # #[macro_use] extern crate rocket; use rocket::config::{Config, Environment};