Remove use of stable 'proc_macro_hygiene' feature.

This commit is contained in:
Sergio Benitez 2020-07-11 10:31:42 -07:00
parent 114a733d70
commit 62355b424f
133 changed files with 395 additions and 676 deletions

View File

@ -6,8 +6,8 @@ extern crate version_check;
use yansi::{Paint, Color::{Red, Yellow, Blue}}; use yansi::{Paint, Color::{Red, Yellow, Blue}};
// Specifies the minimum nightly version needed to compile Rocket. // Specifies the minimum nightly version needed to compile Rocket.
const MIN_DATE: &'static str = "2018-10-05"; const MIN_DATE: &'static str = "2020-05-20";
const MIN_VERSION: &'static str = "1.31.0-nightly"; const MIN_VERSION: &'static str = "1.45.0-nightly";
macro_rules! err { macro_rules! err {
($version:expr, $date:expr, $msg:expr) => ( ($version:expr, $date:expr, $msg:expr) => (

View File

@ -50,8 +50,6 @@
//! In your application's source code, one-time: //! In your application's source code, one-time:
//! //!
//! ```rust //! ```rust
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket;
//! #[macro_use] extern crate rocket_contrib; //! #[macro_use] extern crate rocket_contrib;
//! //!
@ -72,8 +70,6 @@
//! Whenever a connection to the database is needed: //! Whenever a connection to the database is needed:
//! //!
//! ```rust //! ```rust
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib; //! # #[macro_use] extern crate rocket_contrib;
//! # //! #
@ -288,8 +284,6 @@
//! connection to a given database: //! connection to a given database:
//! //!
//! ```rust //! ```rust
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib; //! # #[macro_use] extern crate rocket_contrib;
//! # //! #
@ -310,8 +304,6 @@
//! connection type: //! connection type:
//! //!
//! ```rust //! ```rust
//! # #![feature(proc_macro_hygiene)]
//! #
//! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib; //! # #[macro_use] extern crate rocket_contrib;
//! # //! #

View File

@ -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. /// or from [`serde`]. The data is parsed from the HTTP request body.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # type User = usize; /// # type User = usize;
@ -67,7 +66,6 @@ pub use serde_json::{json_internal, json_internal_vec};
/// set to `application/json` automatically. /// set to `application/json` automatically.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # type User = usize; /// # type User = usize;
@ -218,7 +216,6 @@ impl<T> DerefMut for Json<T> {
/// fashion during request handling. This looks something like: /// fashion during request handling. This looks something like:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::json::JsonValue; /// 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: /// value created with this macro can be returned from a handler as follows:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::json::JsonValue; /// use rocket_contrib::json::JsonValue;

View File

@ -41,7 +41,6 @@ pub use rmp_serde::decode::Error;
/// request body. /// request body.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # type User = usize; /// # type User = usize;
@ -65,7 +64,6 @@ pub use rmp_serde::decode::Error;
/// response is set to `application/msgpack` automatically. /// response is set to `application/msgpack` automatically.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # type User = usize; /// # type User = usize;

View File

@ -12,7 +12,6 @@ use crate::templates::ContextManager;
/// used as a request guard in any request handler. /// used as a request guard in any request handler.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::templates::{Template, Metadata}; /// use rocket_contrib::templates::{Template, Metadata};
@ -46,7 +45,6 @@ impl Metadata<'_> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # /// #
@ -67,7 +65,6 @@ impl Metadata<'_> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # extern crate rocket_contrib; /// # extern crate rocket_contrib;
/// # /// #

View File

@ -37,7 +37,6 @@
//! of the template file minus the last two extensions, from a handler. //! of the template file minus the last two extensions, from a handler.
//! //!
//! ```rust //! ```rust
//! # #![feature(proc_macro_hygiene)]
//! # #[macro_use] extern crate rocket; //! # #[macro_use] extern crate rocket;
//! # #[macro_use] extern crate rocket_contrib; //! # #[macro_use] extern crate rocket_contrib;
//! # fn context() { } //! # fn context() { }
@ -184,7 +183,6 @@ const DEFAULT_TEMPLATE_DIR: &str = "templates";
/// returned from a request handler directly: /// returned from a request handler directly:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// # fn context() { } /// # fn context() { }

View File

@ -42,7 +42,6 @@ type ParseError = <self::uuid_crate::Uuid as FromStr>::Err;
/// You can use the `Uuid` type directly as a target of a dynamic parameter: /// You can use the `Uuid` type directly as a target of a dynamic parameter:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::uuid::Uuid; /// use rocket_contrib::uuid::Uuid;
@ -56,7 +55,6 @@ type ParseError = <self::uuid_crate::Uuid as FromStr>::Err;
/// You can also use the `Uuid` as a form value, including in query strings: /// You can also use the `Uuid` as a form value, including in query strings:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[macro_use] extern crate rocket_contrib; /// # #[macro_use] extern crate rocket_contrib;
/// use rocket_contrib::uuid::Uuid; /// use rocket_contrib::uuid::Uuid;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] #[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))] #[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] #[macro_use]
#[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))] #[cfg(all(feature = "brotli_compression", feature = "gzip_compression"))]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] #[macro_use]
#[cfg(feature = "helmet")] #[cfg(feature = "helmet")]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[cfg(feature = "serve")] #[cfg(feature = "serve")]
mod static_tests { mod static_tests {
use std::{io::Read, fs::File}; use std::{io::Read, fs::File};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[cfg(feature = "templates")] #[cfg(feature = "templates")]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;

View File

@ -3,8 +3,8 @@
use yansi::{Paint, Color::{Red, Yellow, Blue}}; use yansi::{Paint, Color::{Red, Yellow, Blue}};
// Specifies the minimum nightly version needed to compile Rocket. // Specifies the minimum nightly version needed to compile Rocket.
const MIN_DATE: &'static str = "2019-12-29"; const MIN_DATE: &'static str = "2020-05-20";
const MIN_VERSION: &'static str = "1.42.0-nightly"; const MIN_VERSION: &'static str = "1.45.0-nightly";
macro_rules! err { macro_rules! err {
($version:expr, $date:expr, $msg:expr) => ( ($version:expr, $date:expr, $msg:expr) => (

View File

@ -29,8 +29,6 @@
//! crate root: //! crate root:
//! //!
//! ```rust //! ```rust
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket;
//! # #[get("/")] fn hello() { } //! # #[get("/")] fn hello() { }
//! # fn main() { rocket::ignite().mount("/", routes![hello]); } //! # fn main() { rocket::ignite().mount("/", routes![hello]); }
@ -39,7 +37,6 @@
//! Or, alternatively, selectively import from the top-level scope: //! Or, alternatively, selectively import from the top-level scope:
//! //!
//! ```rust //! ```rust
//! #![feature(proc_macro_hygiene)]
//! # extern crate rocket; //! # extern crate rocket;
//! //!
//! use rocket::{get, routes}; //! use rocket::{get, routes};
@ -152,7 +149,6 @@ macro_rules! route_attribute {
/// functions: /// functions:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[get("/")] /// #[get("/")]
@ -175,7 +171,6 @@ macro_rules! route_attribute {
/// specified: /// specified:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[route(GET, path = "/")] /// #[route(GET, path = "/")]
@ -236,7 +231,6 @@ macro_rules! route_attribute {
/// the arguments `foo`, `baz`, `msg`, `rest`, and `form`: /// the arguments `foo`, `baz`, `msg`, `rest`, and `form`:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form; /// # use rocket::request::Form;
/// # use std::path::PathBuf; /// # use std::path::PathBuf;
@ -348,7 +342,6 @@ route_attribute!(options => Method::Options);
/// This attribute can only be applied to free functions: /// This attribute can only be applied to free functions:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// use rocket::Request; /// 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: /// corresponding [`Route`] structures. For example, given the following routes:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[get("/")] /// #[get("/")]
@ -793,7 +785,6 @@ pub fn derive_uri_display_path(input: TokenStream) -> TokenStream {
/// The `routes!` macro can be used as: /// The `routes!` macro can be used as:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # use rocket::http::Method; /// # use rocket::http::Method;
@ -837,7 +828,6 @@ pub fn routes(input: TokenStream) -> TokenStream {
/// catchers: /// catchers:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[catch(404)] /// #[catch(404)]
@ -852,7 +842,6 @@ pub fn routes(input: TokenStream) -> TokenStream {
/// The `catchers!` macro can be used as: /// The `catchers!` macro can be used as:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # #[catch(404)] fn not_found() { /* .. */ } /// # #[catch(404)] fn not_found() { /* .. */ }
@ -894,7 +883,6 @@ pub fn catchers(input: TokenStream) -> TokenStream {
/// For example, for the following route: /// For example, for the following route:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[get("/person/<name>?<age>")] /// #[get("/person/<name>?<age>")]
@ -908,7 +896,6 @@ pub fn catchers(input: TokenStream) -> TokenStream {
/// A URI can be created as follows: /// A URI can be created as follows:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # #[get("/person/<name>?<age>")] /// # #[get("/person/<name>?<age>")]

View File

@ -1,4 +1,3 @@
#![feature(proc_macro_hygiene)]
#![allow(dead_code)] #![allow(dead_code)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::local::blocking::Client; use rocket::local::blocking::Client;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
use rocket::local::asynchronous::Client; use rocket::local::asynchronous::Client;
use rocket::response::Responder; use rocket::response::Responder;
use rocket::http::{Status, ContentType, Cookie}; use rocket::http::{Status, ContentType, Cookie};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::{Request, Data, Outcome::*}; use rocket::{Request, Data, Outcome::*};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::local::blocking::Client; use rocket::local::blocking::Client;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::local::blocking::Client; use rocket::local::blocking::Client;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
// Rocket sometimes generates mangled identifiers that activate the // Rocket sometimes generates mangled identifiers that activate the
// non_snake_case lint. We deny the lint in this test to ensure that // 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. // code generation uses #[allow(non_snake_case)] in the appropriate places.

View File

@ -1,4 +1,3 @@
#![feature(proc_macro_hygiene)]
#![allow(dead_code, unused_variables)] #![allow(dead_code, unused_variables)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
fn main() { fn main() {

View File

@ -1,19 +1,19 @@
error: expected `,` 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 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 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) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -2,8 +2,6 @@
// normalize-stderr-test: "and \d+ others" -> "and $$N others" // normalize-stderr-test: "and \d+ others" -> "and $$N others"
// normalize-stderr-test: "::: (.*)/core/lib" -> "::: $$ROCKET/core/lib" // normalize-stderr-test: "::: (.*)/core/lib" -> "::: $$ROCKET/core/lib"
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
#[derive(Responder)] #[derive(Responder)]

View File

@ -1,15 +1,15 @@
error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:11:5 --> $DIR/responder-types.rs:9:5
| |
11 | thing: u8, 9 | thing: u8,
| ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8` | ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8`
| |
= note: required by `rocket::response::Responder::respond_to` = note: required by `rocket::response::Responder::respond_to`
error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>` is not satisfied error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>` 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<u8>` is not implemented for `rocket::http::Header<'_>` | ^^^^^^^^^ the trait `std::convert::From<u8>` is not implemented for `rocket::http::Header<'_>`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -18,17 +18,17 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>`
= note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `u8` = note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `u8`
error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied 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` | ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8`
| |
= note: required by `rocket::response::Responder::respond_to` = note: required by `rocket::response::Responder::respond_to`
error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>` is not satisfied error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>` 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<u8>` is not implemented for `rocket::http::Header<'_>` | ^^^^^^^^^ the trait `std::convert::From<u8>` is not implemented for `rocket::http::Header<'_>`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -37,9 +37,9 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<u8>`
= note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `u8` = note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `u8`
error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<std::string::String>` is not satisfied error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<std::string::String>` 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<std::string::String>` is not implemented for `rocket::http::Header<'_>` | ^^^^^^^^^^^^ the trait `std::convert::From<std::string::String>` is not implemented for `rocket::http::Header<'_>`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -48,9 +48,9 @@ error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<std:
= note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `std::string::String` = note: required because of the requirements on the impl of `std::convert::Into<rocket::http::Header<'_>>` for `std::string::String`
error[E0277]: the trait bound `usize: rocket::response::Responder<'_, '_>` is not satisfied 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` | ^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `usize`
| |
= note: required by `rocket::handler::<impl rocket::Outcome<rocket::Response<'o>, rocket::http::Status, rocket::Data>>::from` = note: required by `rocket::handler::<impl rocket::Outcome<rocket::Response<'o>, rocket::http::Status, rocket::Data>>::from`

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
// Check a path is supplied, at least. // Check a path is supplied, at least.

View File

@ -1,216 +1,216 @@
error: missing expected parameter: `path` 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) = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected `fn` 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 = help: #[get] can only be used on functions
error: expected `fn` 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 = help: #[get] can only be used on functions
error: expected `fn` 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 = help: #[get] can only be used on functions
error: expected `fn` 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 = help: #[get] can only be used on functions
error: expected key/value pair 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 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 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 = "<foo>", "/")] //~ ERROR unexpected keyed parameter 38 | #[get(data = "<foo>", "/")] //~ ERROR unexpected keyed parameter
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
error: unexpected attribute parameter: `unknown` 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 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, ..)] = 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) = 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 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` = help: all handler arguments must be of the form: `ident: Type`
error: invalid value: expected string literal 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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` = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: invalid HTTP method 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` = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal 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` = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal 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` = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found integer literal 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` = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
// Check that route paths are absolute and normalized. // Check that route paths are absolute and normalized.

View File

@ -1,262 +1,262 @@
error: invalid path URI: expected token '/' but found 'a' at index 0 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/<param>" = help: expected path in origin form: "/path/<param>"
error: invalid path URI: expected token '/' but none was found at index 0 error: invalid path URI: expected token '/' but none was found at index 0
--> $DIR/route-path-bad-syntax.rs:11:8 --> $DIR/route-path-bad-syntax.rs:9:8
| |
11 | #[get("")] //~ ERROR invalid path URI 9 | #[get("")] //~ ERROR invalid path URI
| ^ | ^
| |
= help: expected path in origin form: "/path/<param>" = help: expected path in origin form: "/path/<param>"
error: invalid path URI: expected token '/' but found 'a' at index 0 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/<param>" = help: expected path in origin form: "/path/<param>"
error: paths cannot contain empty segments 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' = note: expected '/a/b', found '/a///b'
error: query cannot contain empty segments 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 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 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//' = note: expected '/a/b', found '/a/b//'
error: invalid path URI: expected EOF but found '#' at index 3 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/<param>" = help: expected path in origin form: "/path/<param>"
error: component contains invalid URI characters 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 = note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc. = help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters 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 = note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc. = help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters 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 = note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc. = help: reserved characters include: '%', '+', '&', etc.
error: unused dynamic parameter error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:56:9 --> $DIR/route-path-bad-syntax.rs:54:9
| |
56 | #[get("/<name>")] //~ ERROR unused dynamic parameter 54 | #[get("/<name>")] //~ ERROR unused dynamic parameter
| ^^^^^^ | ^^^^^^
| |
note: expected argument named `name` here 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 error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:59:11 --> $DIR/route-path-bad-syntax.rs:57:11
| |
59 | #[get("/a?<r>")] //~ ERROR unused dynamic parameter 57 | #[get("/a?<r>")] //~ ERROR unused dynamic parameter
| ^^^ | ^^^
| |
note: expected argument named `r` here 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 error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:62:22 --> $DIR/route-path-bad-syntax.rs:60:22
| |
62 | #[post("/a", data = "<test>")] //~ ERROR unused dynamic parameter 60 | #[post("/a", data = "<test>")] //~ ERROR unused dynamic parameter
| ^^^^^^ | ^^^^^^
| |
note: expected argument named `test` here 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 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 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 error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:68:9 --> $DIR/route-path-bad-syntax.rs:66:9
| |
68 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter 66 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
| ^^^^ | ^^^^
| |
note: expected argument named `_r` here 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 error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:68:14 --> $DIR/route-path-bad-syntax.rs:66:14
| |
68 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter 66 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
| ^^^ | ^^^
| |
note: expected argument named `b` here 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 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("/<foo_.>")] //~ ERROR `foo_.` is not a valid identifier 73 | #[get("/<foo_.>")] //~ ERROR `foo_.` is not a valid identifier
| ^^^^^^^ | ^^^^^^^
| |
= help: parameter names must be valid identifiers = help: parameter names must be valid identifiers
error: `foo*` is not a valid identifier 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("/<foo*>")] //~ ERROR `foo*` is not a valid identifier 77 | #[get("/<foo*>")] //~ ERROR `foo*` is not a valid identifier
| ^^^^^^ | ^^^^^^
| |
= help: parameter names must be valid identifiers = help: parameter names must be valid identifiers
error: `!` is not a valid identifier 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 = help: parameter names must be valid identifiers
error: `name>:<id` is not a valid identifier error: `name>:<id` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:87:9 --> $DIR/route-path-bad-syntax.rs:85:9
| |
87 | #[get("/<name>:<id>")] //~ ERROR `name>:<id` is not a valid identifier 85 | #[get("/<name>:<id>")] //~ ERROR `name>:<id` is not a valid identifier
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| |
= help: parameter names must be valid identifiers = help: parameter names must be valid identifiers
error: malformed parameter error: malformed parameter
--> $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 '<param>' = help: parameter must be of the form '<param>'
error: malformed parameter error: malformed parameter
--> $DIR/route-path-bad-syntax.rs:97:20 --> $DIR/route-path-bad-syntax.rs:95:20
| |
97 | #[get("/", data = "<foo..>")] //~ ERROR malformed parameter 95 | #[get("/", data = "<foo..>")] //~ ERROR malformed parameter
| ^^^^^^^ | ^^^^^^^
| |
= help: parameter must be of the form '<param>' = help: parameter must be of the form '<param>'
error: parameter is missing a closing bracket error: parameter is missing a closing bracket
--> $DIR/route-path-bad-syntax.rs:101:20 --> $DIR/route-path-bad-syntax.rs:99:20
| |
101 | #[get("/", data = "<foo")] //~ ERROR missing a closing bracket 99 | #[get("/", data = "<foo")] //~ ERROR missing a closing bracket
| ^^^^ | ^^^^
| |
= help: did you mean '<foo>'? = help: did you mean '<foo>'?
error: `test ` is not a valid identifier 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 = "<test >")] //~ ERROR `test ` is not a valid identifier 103 | #[get("/", data = "<test >")] //~ ERROR `test ` is not a valid identifier
| ^^^^^^^ | ^^^^^^^
| |
= help: parameter names must be valid identifiers = help: parameter names must be valid identifiers
error: parameters must be named 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` = help: use a name such as `_guard` or `_param`
error: parameter names cannot be empty 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 error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:119:9 --> $DIR/route-path-bad-syntax.rs:117:9
| |
119 | #[get("/<id><")] //~ ERROR malformed parameter 117 | #[get("/<id><")] //~ ERROR malformed parameter
| ^^^^^ | ^^^^^
| |
= help: parameters must be of the form '<param>' = help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>' = help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:124:9 --> $DIR/route-path-bad-syntax.rs:122:9
| |
124 | #[get("/<<<<id><")] //~ ERROR malformed parameter 122 | #[get("/<<<<id><")] //~ ERROR malformed parameter
| ^^^^^^^^ | ^^^^^^^^
| |
= help: parameters must be of the form '<param>' = help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>' = help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier 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 '<param>' = help: parameters must be of the form '<param>'

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
struct Q; struct Q;

View File

@ -1,63 +1,63 @@
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromSegments<'_>` is not satisfied error[E0277]: the trait bound `Q: rocket::request::FromSegments<'_>` is not satisfied
--> $DIR/route-type-errors.rs:11:7 --> $DIR/route-type-errors.rs:9:7
| |
11 | fn f1(foo: Q) {} //~ ERROR FromSegments 9 | fn f1(foo: Q) {} //~ ERROR FromSegments
| ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q` | ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromFormValue<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromQuery<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromQuery<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::data::FromDataSimple` is not satisfied 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` | ^^^^^^ 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` = 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 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` | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied 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` | ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied 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` | ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error: aborting due to 10 previous errors error: aborting due to 10 previous errors

View File

@ -1,7 +1,5 @@
// must-compile-successfully // must-compile-successfully
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
// Check for unknown media types. // Check for unknown media types.

View File

@ -1,44 +1,44 @@
warning: 'application/x-custom' is not a known media type 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 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 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 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 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) = 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 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 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) = note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
fn main() { fn main() {

View File

@ -1,19 +1,19 @@
error: expected `,` 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 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 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) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -2,8 +2,6 @@
// normalize-stderr-test: "and \d+ others" -> "and $$N others" // normalize-stderr-test: "and \d+ others" -> "and $$N others"
// normalize-stderr-test: "::: (.*)/core/http" -> "::: $$ROCKET/core/http" // normalize-stderr-test: "::: (.*)/core/http" -> "::: $$ROCKET/core/http"
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::http::RawStr; use rocket::http::RawStr;

View File

@ -1,7 +1,7 @@
error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` is not satisfied error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` 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<rocket::http::uri::Path, &str>` is not implemented for `usize` | ^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` is not implemented for `usize`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -11,9 +11,9 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::ht
= note: required by `rocket::http::uri::FromUriParam::from_uri_param` = note: required by `rocket::http::uri::FromUriParam::from_uri_param`
error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` is not satisfied error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` 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<rocket::http::uri::Path, &str>` is not implemented for `usize` | ^^^^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, &str>` is not implemented for `usize`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -23,9 +23,9 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::ht
= note: required by `rocket::http::uri::FromUriParam::from_uri_param` = note: required by `rocket::http::uri::FromUriParam::from_uri_param`
error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, i64>` is not satisfied error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::http::uri::Path, i64>` 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<rocket::http::uri::Path, i64>` is not implemented for `usize` | ^^^^^^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, i64>` is not implemented for `usize`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -35,15 +35,15 @@ error[E0277]: the trait bound `usize: rocket::http::uri::FromUriParam<rocket::ht
= note: required by `rocket::http::uri::FromUriParam::from_uri_param` = note: required by `rocket::http::uri::FromUriParam::from_uri_param`
error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Path, _>` is not satisfied error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Path, _>` 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<rocket::http::uri::Path, _>` is not implemented for `S` | ^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, _>` is not implemented for `S`
error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::option::Option<{integer}>>` is not satisfied error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::option::Option<{integer}>>` 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<rocket::http::uri::Path, std::option::Option<{integer}>>` is not implemented for `i32` | ^^^^^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::option::Option<{integer}>>` is not implemented for `i32`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -53,9 +53,9 @@ error[E0277]: the trait bound `i32: rocket::http::uri::FromUriParam<rocket::http
= note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::option::Option<{integer}>>` for `std::option::Option<i32>` = note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::option::Option<{integer}>>` for `std::option::Option<i32>`
error[E0277]: the trait bound `std::string::String: rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` is not satisfied error[E0277]: the trait bound `std::string::String: rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` 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<rocket::http::uri::Path, std::result::Result<_, _>>` is not implemented for `std::string::String` | ^^^^^^^^^^^^^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` is not implemented for `std::string::String`
| |
= help: the following implementations were found: = 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<rocket::http::uri::Path, std::result::Result<_, _>>` for `std::result::Result<std::string::String, &rocket::http::RawStr>` = note: required because of the requirements on the impl of `rocket::http::uri::FromUriParam<rocket::http::uri::Path, std::result::Result<_, _>>` for `std::result::Result<std::string::String, &rocket::http::RawStr>`
error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` is not satisfied error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` 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<rocket::http::uri::Query, &str>` is not implemented for `isize` | ^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` is not implemented for `isize`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -79,9 +79,9 @@ error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::ht
= note: required by `rocket::http::uri::FromUriParam::from_uri_param` = note: required by `rocket::http::uri::FromUriParam::from_uri_param`
error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` is not satisfied error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` 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<rocket::http::uri::Query, &str>` is not implemented for `isize` | ^^^^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Query, &str>` is not implemented for `isize`
| |
= help: the following implementations were found: = help: the following implementations were found:
@ -91,53 +91,53 @@ error[E0277]: the trait bound `isize: rocket::http::uri::FromUriParam<rocket::ht
= note: required by `rocket::http::uri::FromUriParam::from_uri_param` = note: required by `rocket::http::uri::FromUriParam::from_uri_param`
error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not satisfied error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` 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<rocket::http::uri::Query, _>` is not implemented for `S` | ^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not satisfied error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` 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<rocket::http::uri::Query, _>` is not implemented for `S` | ^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
error[E0277]: the trait bound `S: rocket::http::uri::Ignorable<rocket::http::uri::Query>` is not satisfied error[E0277]: the trait bound `S: rocket::http::uri::Ignorable<rocket::http::uri::Query>` 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<rocket::http::uri::Query>` is not implemented for `S` | ^ the trait `rocket::http::uri::Ignorable<rocket::http::uri::Query>` is not implemented for `S`
... ...
81 | uri!(other_q: rest = _, id = 100); 79 | uri!(other_q: rest = _, id = 100);
| ---------------------------------- in this macro invocation | ---------------------------------- 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<P: UriPart, T: Ignorable<P>>() { } 465 | pub fn assert_ignorable<P: UriPart, T: Ignorable<P>>() { }
| ------------ required by this bound in `rocket::http::uri::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) = 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<rocket::http::uri::Query>` is not satisfied error[E0277]: the trait bound `usize: rocket::http::uri::Ignorable<rocket::http::uri::Query>` 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<rocket::http::uri::Query>` is not implemented for `usize` | ^^^^^ the trait `rocket::http::uri::Ignorable<rocket::http::uri::Query>` is not implemented for `usize`
... ...
83 | uri!(other_q: rest = S, id = _); 81 | uri!(other_q: rest = S, id = _);
| -------------------------------- in this macro invocation | -------------------------------- 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<P: UriPart, T: Ignorable<P>>() { } 465 | pub fn assert_ignorable<P: UriPart, T: Ignorable<P>>() { }
| ------------ required by this bound in `rocket::http::uri::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) = 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<rocket::http::uri::Query, _>` is not satisfied error[E0277]: the trait bound `S: rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` 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<rocket::http::uri::Query, _>` is not implemented for `S` | ^ the trait `rocket::http::uri::FromUriParam<rocket::http::uri::Query, _>` is not implemented for `S`
error: aborting due to 13 previous errors error: aborting due to 13 previous errors

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use std::fmt; use std::fmt;

View File

@ -1,238 +1,238 @@
error: path parameters cannot be ignored 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 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 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 = note: uri parameters are: id: i32, name: String
= help: missing parameter: `name` = help: missing parameter: `name`
help: unknown parameter: `cookies` 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 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 = note: uri parameters are: id: i32, name: String
= help: missing parameter: `name` = help: missing parameter: `name`
help: unknown parameter: `cookies` 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` 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 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 = note: uri parameters are: id: i32, name: String
= help: missing parameter: `id` = help: missing parameter: `id`
error: invalid parameters for `has_two` route uri 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 = note: uri parameters are: id: i32, name: String
= help: missing parameter: `name` = help: missing parameter: `name`
help: duplicate parameter: `id` 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 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 = note: uri parameters are: id: i32
help: unknown parameter: `cookies` 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 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 = note: uri parameters are: id: i32
help: unknown parameter: `cookies` 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 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 = note: uri parameters are: id: i32
= help: missing parameter: `id` = help: missing parameter: `id`
help: unknown parameter: `name` 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 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 = note: uri parameters are: id: i32
help: duplicate parameter: `id` 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 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 = note: uri parameters are: id: i32
help: duplicate parameter: `id` 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 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 = note: uri parameters are: id: i32
help: unknown parameters: `name`, `age` 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` 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 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 = note: uri parameters are: id: i32
help: unknown parameters: `name`, `age` 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 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 = note: uri parameters are: id: i32
help: unknown parameter: `name` 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 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 = note: uri parameters are: id: i32
help: unknown parameter: `name` 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 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 = note: expected parameters: id: i32, name: String
error: `has_two` route uri expects 2 parameters but 3 were supplied 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 = note: expected parameters: id: i32, name: String
error: `has_one_guarded` route uri expects 1 parameter but 2 were supplied 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 = note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 2 were supplied 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 = note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 2 were supplied 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 = note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 0 were supplied 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 = note: expected parameter: id: i32

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
#[post("/<id>/<name>")] #[post("/<id>/<name>")]

View File

@ -1,65 +1,65 @@
error: named and unnamed parameters cannot be mixed 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 error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:10:18 --> $DIR/typed-uris-invalid-syntax.rs:8:18
| |
10 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed 8 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
error: expected `:` error: expected `:`
--> $DIR/typed-uris-invalid-syntax.rs:11:16 --> $DIR/typed-uris-invalid-syntax.rs:9:16
| |
11 | uri!(simple,); //~ ERROR expected `:` 9 | uri!(simple,); //~ ERROR expected `:`
| ^ | ^
error: expected argument list after `:` 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 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 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) = 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` 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` 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/<id>", simple); //~ invalid mount point 14 | uri!("/mount/<id>", simple); //~ invalid mount point
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
error: unexpected end of input, call to `uri!` cannot be empty 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) = 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 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) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -137,9 +137,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay<rocket::http:
5 | #[derive(UriDisplayQuery)] 5 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo1` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
5 | #[derive(UriDisplayQuery)] 5 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo1` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo1` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo1`
@ -164,9 +164,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay<rocket::http:
5 | #[derive(UriDisplayQuery)] 5 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo1` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo1` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo1`
@ -178,9 +178,9 @@ error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay<rocket::http:
12 | #[derive(UriDisplayQuery)] 12 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo2` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
12 | #[derive(UriDisplayQuery)] 12 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo2` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo2` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo2`
@ -205,9 +205,9 @@ error[E0277]: the trait bound `Foo2: rocket::http::uri::UriDisplay<rocket::http:
12 | #[derive(UriDisplayQuery)] 12 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo2` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo2` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo2`
@ -219,9 +219,9 @@ error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay<rocket::http:
19 | #[derive(UriDisplayQuery)] 19 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo3` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
19 | #[derive(UriDisplayQuery)] 19 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo3` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo3` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo3`
@ -246,9 +246,9 @@ error[E0277]: the trait bound `Foo3: rocket::http::uri::UriDisplay<rocket::http:
19 | #[derive(UriDisplayQuery)] 19 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo3` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo3` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo3`
@ -260,9 +260,9 @@ error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay<rocket::http:
26 | #[derive(UriDisplayQuery)] 26 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo4` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
26 | #[derive(UriDisplayQuery)] 26 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo4` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo4` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo4`
@ -287,9 +287,9 @@ error[E0277]: the trait bound `Foo4: rocket::http::uri::UriDisplay<rocket::http:
26 | #[derive(UriDisplayQuery)] 26 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo4` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo4` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo4`
@ -301,9 +301,9 @@ error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay<rocket::http:
35 | #[derive(UriDisplayQuery)] 35 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo5` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
35 | #[derive(UriDisplayQuery)] 35 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo5` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo5` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo5`
@ -328,9 +328,9 @@ error[E0277]: the trait bound `Foo5: rocket::http::uri::UriDisplay<rocket::http:
35 | #[derive(UriDisplayQuery)] 35 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo5` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo5` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo5`
@ -342,9 +342,9 @@ error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay<rocket::http:
42 | #[derive(UriDisplayQuery)] 42 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo6` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
42 | #[derive(UriDisplayQuery)] 42 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo6` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo6` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&Foo6`
@ -369,9 +369,9 @@ error[E0277]: the trait bound `Foo6: rocket::http::uri::UriDisplay<rocket::http:
42 | #[derive(UriDisplayQuery)] 42 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` is not implemented for `Foo6` | ^^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo6` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Query>` for `&mut Foo6`
@ -383,9 +383,9 @@ error[E0277]: the trait bound `Foo7: rocket::http::uri::UriDisplay<rocket::http:
52 | #[derive(UriDisplayPath)] 52 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo7` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
52 | #[derive(UriDisplayPath)] 52 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo7` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo7` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo7`
@ -410,9 +410,9 @@ error[E0277]: the trait bound `Foo8: rocket::http::uri::UriDisplay<rocket::http:
58 | #[derive(UriDisplayPath)] 58 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo8` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
58 | #[derive(UriDisplayPath)] 58 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo8` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo8` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo8`
@ -437,9 +437,9 @@ error[E0277]: the trait bound `Foo9: rocket::http::uri::UriDisplay<rocket::http:
64 | #[derive(UriDisplayPath)] 64 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo9` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http:
64 | #[derive(UriDisplayPath)] 64 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo9` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo9` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo9`
@ -464,9 +464,9 @@ error[E0277]: the trait bound `Foo10: rocket::http::uri::UriDisplay<rocket::http
70 | #[derive(UriDisplayPath)] 70 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo10` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- 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) = 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<rocket::http
70 | #[derive(UriDisplayPath)] 70 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` is not implemented for `Foo10` | ^^^^^^^^^^^^^^ the trait `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` 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<P>; 195 | type Target: UriDisplay<P>;
| ------------- required by this bound in `rocket::http::uri::FromUriParam` | ------------- required by this bound in `rocket::http::uri::FromUriParam`
| |
= note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo10` = note: required because of the requirements on the impl of `rocket::http::uri::UriDisplay<rocket::http::uri::Path>` for `&Foo10`

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::http::RawStr; use rocket::http::RawStr;

View File

@ -54,7 +54,6 @@ mod key {
/// a handler to retrieve the value of a "message" cookie. /// a handler to retrieve the value of a "message" cookie.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::http::Cookies; /// use rocket::http::Cookies;
/// ///
@ -74,7 +73,6 @@ mod key {
/// [private cookie]: Cookies::add_private() /// [private cookie]: Cookies::add_private()
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// use rocket::http::Status; /// use rocket::http::Status;

View File

@ -1,4 +1,3 @@
#![feature(proc_macro_hygiene)]
#![recursion_limit="512"] #![recursion_limit="512"]
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]

View File

@ -155,7 +155,6 @@ use crate::uri::{self, UriPart, UriDisplay};
/// With these implementations, the following typechecks: /// With these implementations, the following typechecks:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use std::fmt; /// # use std::fmt;
/// use rocket::http::RawStr; /// use rocket::http::RawStr;

View File

@ -61,7 +61,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// the following route: /// the following route:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// #[get("/item/<id>?<track>")] /// #[get("/item/<id>?<track>")]
/// fn get_item(id: i32, track: Option<String>) { /* .. */ } /// fn get_item(id: i32, track: Option<String>) { /* .. */ }
@ -70,7 +69,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// A URI for this route can be generated as follows: /// A URI for this route can be generated as follows:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type T = (); /// # type T = ();
/// # #[get("/item/<id>?<track>")] /// # #[get("/item/<id>?<track>")]
@ -236,7 +234,6 @@ use crate::uri::{Uri, UriPart, Path, Query, Formatter};
/// `UriDisplay` implementation is required. /// `UriDisplay` implementation is required.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::http::RawStr; /// use rocket::http::RawStr;
/// use rocket::request::FromParam; /// use rocket::request::FromParam;
@ -434,7 +431,6 @@ impl<T: UriDisplay<Query>, E> UriDisplay<Query> for Result<T, E> {
/// trait for the corresponding `UriPart`. /// trait for the corresponding `UriPart`.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// #[get("/item/<id>?<track>")] /// #[get("/item/<id>?<track>")]
/// fn get_item(id: i32, track: Option<u8>) { /* .. */ } /// fn get_item(id: i32, track: Option<u8>) { /* .. */ }

View File

@ -1,6 +1,4 @@
#![feature(test)] #![feature(test)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::config::{Environment, Config, LoggingLevel}; use rocket::config::{Environment, Config, LoggingLevel};

View File

@ -1,6 +1,4 @@
#![feature(test)] #![feature(test)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::config::{Environment, Config, LoggingLevel}; use rocket::config::{Environment, Config, LoggingLevel};

View File

@ -1,6 +1,4 @@
#![feature(test)] #![feature(test)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::config::{Environment, Config, LoggingLevel}; use rocket::config::{Environment, Config, LoggingLevel};

View File

@ -4,8 +4,8 @@ use yansi::{Paint, Color::{Red, Yellow, Blue}};
// Specifies the minimum nightly version needed to compile Rocket. // Specifies the minimum nightly version needed to compile Rocket.
const MIN_DATE: &'static str = "2019-11-24"; const MIN_DATE: &'static str = "2020-05-20";
const MIN_VERSION: &'static str = "1.41.0-nightly"; const MIN_VERSION: &'static str = "1.45.0-nightly";
macro_rules! err { macro_rules! err {
($version:expr, $date:expr, $msg:expr) => ( ($version:expr, $date:expr, $msg:expr) => (

View File

@ -36,7 +36,6 @@ use yansi::Color::*;
/// declared using the `catch` decorator, as follows: /// declared using the `catch` decorator, as follows:
/// ///
/// ```rust,no_run /// ```rust,no_run
/// #![feature(proc_macro_hygiene)]
/// ///
/// #[macro_use] extern crate rocket; /// #[macro_use] extern crate rocket;
/// ///

View File

@ -20,7 +20,6 @@ const PEEK_BYTES: usize = 512;
/// specifying the `data = "<var>"` route parameter as follows: /// specifying the `data = "<var>"` route parameter as follows:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type DataGuard = rocket::data::Data; /// # type DataGuard = rocket::data::Data;
/// #[post("/submit", data = "<var>")] /// #[post("/submit", data = "<var>")]

View File

@ -144,7 +144,6 @@ pub type FromDataFuture<'fut, T, E> = BoxFuture<'fut, Outcome<T, E>>;
/// if the guard returns successfully. /// if the guard returns successfully.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type DataGuard = rocket::data::Data; /// # type DataGuard = rocket::data::Data;
/// #[post("/submit", data = "<var>")] /// #[post("/submit", data = "<var>")]
@ -191,7 +190,6 @@ pub type FromDataFuture<'fut, T, E> = BoxFuture<'fut, Outcome<T, E>>;
/// `String` (an `&str`). /// `String` (an `&str`).
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[derive(Debug)] /// # #[derive(Debug)]
/// # struct Name<'a> { first: &'a str, last: &'a str, } /// # 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: /// that you can retrieve it directly from a client's request body:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type Person = rocket::data::Data; /// # type Person = rocket::data::Data;
/// #[post("/person", data = "<person>")] /// #[post("/person", data = "<person>")]
@ -456,7 +453,6 @@ impl<'a> FromData<'a> for Data {
/// A `FromDataSimple` implementation allowing this looks like: /// A `FromDataSimple` implementation allowing this looks like:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # #[derive(Debug)] /// # #[derive(Debug)]

View File

@ -94,7 +94,6 @@ pub type HandlerFuture<'r> = BoxFuture<'r, Outcome<'r>>;
/// managed state and a static route, as follows: /// managed state and a static route, as follows:
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # #[derive(Copy, Clone)] /// # #[derive(Copy, Clone)]

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#![recursion_limit="256"] #![recursion_limit="256"]
#![doc(html_root_url = "https://api.rocket.rs/v0.5")] #![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: //! Then, add the following to the top of your `main.rs` file:
//! //!
//! ```rust //! ```rust
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket;
//! # #[get("/")] fn hello() { } //! # #[get("/")] fn hello() { }
//! # fn main() { rocket::ignite().mount("/", routes![hello]); } //! # fn main() { rocket::ignite().mount("/", routes![hello]); }
@ -58,7 +54,6 @@
//! write Rocket applications. Here's a simple example to get you started: //! write Rocket applications. Here's a simple example to get you started:
//! //!
//! ```rust,no_run //! ```rust,no_run
//! #![feature(proc_macro_hygiene)]
//! //!
//! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket;
//! //!

View File

@ -34,8 +34,6 @@
//! world!" application, with testing. //! world!" application, with testing.
//! //!
//! ```rust //! ```rust
//! #![feature(proc_macro_hygiene)]
//!
//! #[macro_use] extern crate rocket; //! #[macro_use] extern crate rocket;
//! //!
//! #[get("/")] //! #[get("/")]

View File

@ -621,7 +621,6 @@ impl<'a, S: Send + 'a, E: Send + 'a, F: Send + 'a> Outcome<S, E, F> {
/// ## Example /// ## Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use std::sync::atomic::{AtomicUsize, Ordering}; /// # use std::sync::atomic::{AtomicUsize, Ordering};
/// use rocket::request::{self, Request, FromRequest, State}; /// use rocket::request::{self, Request, FromRequest, State};

View File

@ -50,7 +50,6 @@ pub enum FormDataError<'f, E> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::{Form, FormError, FormDataError}; /// use rocket::request::{Form, FormError, FormDataError};
/// ///

View File

@ -32,7 +32,6 @@ use crate::http::{Status, uri::{Query, FromUriParam}};
/// implements the `FromForm` trait: /// implements the `FromForm` trait:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::Form; /// use rocket::request::Form;
/// use rocket::http::RawStr; /// 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: /// A handler that handles a form of this type can similarly by written:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, unused_attributes)] /// # #![allow(deprecated, unused_attributes)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form; /// # use rocket::request::Form;
@ -121,7 +119,6 @@ impl<T> Form<T> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::Form; /// use rocket::request::Form;
/// ///

View File

@ -13,7 +13,6 @@ use crate::request::FormItems;
/// validation. /// validation.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, dead_code, unused_attributes)] /// # #![allow(deprecated, dead_code, unused_attributes)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// #[derive(FromForm)] /// #[derive(FromForm)]
@ -30,7 +29,6 @@ use crate::request::FormItems;
/// data via the `data` parameter and `Form` type. /// data via the `data` parameter and `Form` type.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #![allow(deprecated, dead_code, unused_attributes)] /// # #![allow(deprecated, dead_code, unused_attributes)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::request::Form; /// # use rocket::request::Form;

View File

@ -43,7 +43,6 @@ use crate::http::RawStr;
/// according to its target type: /// according to its target type:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type Size = String; /// # type Size = String;
/// #[get("/item?<id>&<size>")] /// #[get("/item?<id>&<size>")]

View File

@ -31,7 +31,6 @@ use crate::http::uri::{Query, FromUriParam};
/// handler: /// handler:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::LenientForm; /// use rocket::request::LenientForm;
/// ///
@ -67,7 +66,6 @@ impl<T> LenientForm<T> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::LenientForm; /// use rocket::request::LenientForm;
/// ///

View File

@ -78,7 +78,6 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// guard. /// guard.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::http::Method; /// # use rocket::http::Method;
/// # type A = Method; type B = Method; type C = Method; type T = (); /// # type A = Method; type B = Method; type C = Method; type T = ();
@ -188,7 +187,6 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// `sensitive` handler. /// `sensitive` handler.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// use rocket::Outcome; /// use rocket::Outcome;
@ -244,7 +242,6 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// routes (`admin_dashboard` and `user_dashboard`): /// routes (`admin_dashboard` and `user_dashboard`):
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[cfg(feature = "private-cookies")] mod inner { /// # #[cfg(feature = "private-cookies")] mod inner {
/// # use rocket::outcome::{IntoOutcome, Outcome}; /// # use rocket::outcome::{IntoOutcome, Outcome};
@ -309,7 +306,6 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
/// used, as illustrated below: /// used, as illustrated below:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # #[cfg(feature = "private-cookies")] mod inner { /// # #[cfg(feature = "private-cookies")] mod inner {
/// # use rocket::outcome::{IntoOutcome, Outcome}; /// # use rocket::outcome::{IntoOutcome, Outcome};

View File

@ -19,7 +19,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// handler for the dynamic `"/<id>"` path: /// handler for the dynamic `"/<id>"` path:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// #[get("/<id>")] /// #[get("/<id>")]
/// fn hello(id: usize) -> String { /// fn hello(id: usize) -> String {
@ -54,7 +53,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// parameter as follows: /// parameter as follows:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::http::RawStr; /// # use rocket::http::RawStr;
/// #[get("/<id>")] /// #[get("/<id>")]
@ -172,7 +170,6 @@ use crate::http::{RawStr, uri::{Segments, SegmentError}};
/// dynamic path segment: /// dynamic path segment:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # use rocket::request::FromParam; /// # use rocket::request::FromParam;
/// # use rocket::http::RawStr; /// # use rocket::http::RawStr;

View File

@ -8,7 +8,6 @@ use crate::request::{FormItems, FormItem, Form, LenientForm, FromForm};
/// generation for every trailing query parameter, `<params..>` below: /// generation for every trailing query parameter, `<params..>` below:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # use rocket::request::Form; /// # use rocket::request::Form;
@ -82,7 +81,6 @@ impl<'q> Iterator for Query<'q> {
/// route: /// route:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::request::Form; /// use rocket::request::Form;
/// ///

View File

@ -22,7 +22,6 @@ use crate::http::Status;
/// following example does just this: /// following example does just this:
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::State; /// use rocket::State;
/// ///
@ -82,7 +81,6 @@ use crate::http::Status;
/// [`State::from()`] static method: /// [`State::from()`] static method:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::State; /// use rocket::State;
/// ///

View File

@ -17,7 +17,6 @@ use yansi::Paint;
/// automatically: /// automatically:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// use std::io; /// use std::io;
/// ///
/// use tokio::io::AsyncReadExt; /// use tokio::io::AsyncReadExt;
@ -38,7 +37,6 @@ use yansi::Paint;
/// [`Result::map_err()`]: /// [`Result::map_err()`]:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// use std::string::FromUtf8Error; /// use std::string::FromUtf8Error;
/// ///
/// # use rocket::get; /// # use rocket::get;

View File

@ -48,7 +48,6 @@ const FLASH_COOKIE_DELIM: char = ':';
/// request and response sides. /// request and response sides.
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::response::{Flash, Redirect}; /// use rocket::response::{Flash, Redirect};
/// use rocket::request::FlashMessage; /// use rocket::request::FlashMessage;

View File

@ -26,7 +26,6 @@ use crate::http::Status;
/// a route, _always_ use [`uri!`] to construct a valid [`Origin`]: /// a route, _always_ use [`uri!`] to construct a valid [`Origin`]:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::response::Redirect; /// use rocket::response::Redirect;
/// ///

View File

@ -11,7 +11,6 @@ use crate::request::Request;
/// as illustrated below with `T`: /// as illustrated below with `T`:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # type T = (); /// # type T = ();
/// # /// #
@ -152,7 +151,6 @@ use crate::request::Request;
/// following `Responder` implementation accomplishes this: /// following `Responder` implementation accomplishes this:
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// # #[derive(Debug)] /// # #[derive(Debug)]

View File

@ -41,7 +41,6 @@ impl<'r, R> Created<R> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # use rocket::{get, routes, local::blocking::Client}; /// # use rocket::{get, routes, local::blocking::Client};
/// use rocket::response::status; /// use rocket::response::status;
/// ///
@ -70,7 +69,6 @@ impl<'r, R> Created<R> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # use rocket::{get, routes, local::blocking::Client}; /// # use rocket::{get, routes, local::blocking::Client};
/// use rocket::response::status; /// use rocket::response::status;
/// ///
@ -104,7 +102,6 @@ impl<'r, R> Created<R> {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # use rocket::{get, routes, local::blocking::Client}; /// # use rocket::{get, routes, local::blocking::Client};
/// use rocket::response::status; /// use rocket::response::status;
/// ///

View File

@ -686,7 +686,6 @@ impl Rocket {
/// dispatched to the `hi` route. /// dispatched to the `hi` route.
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// #[get("/world")] /// #[get("/world")]
@ -740,7 +739,6 @@ impl Rocket {
/// # Examples /// # Examples
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::Request; /// use rocket::Request;
/// ///
@ -782,7 +780,6 @@ impl Rocket {
/// # Example /// # Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::State; /// use rocket::State;
/// ///
@ -820,7 +817,6 @@ impl Rocket {
/// # Example /// # Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::Rocket; /// use rocket::Rocket;
/// use rocket::fairing::AdHoc; /// use rocket::fairing::AdHoc;
@ -907,7 +903,6 @@ impl Rocket {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # use std::{thread, time::Duration}; /// # use std::{thread, time::Duration};
/// # /// #
/// # rocket::async_test(async { /// # rocket::async_test(async {
@ -1069,7 +1064,6 @@ impl Cargo {
/// # Example /// # Example
/// ///
/// ```rust /// ```rust
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::Rocket; /// use rocket::Rocket;
/// use rocket::fairing::AdHoc; /// use rocket::fairing::AdHoc;
@ -1128,7 +1122,6 @@ impl Cargo {
/// # Example /// # Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// use rocket::Rocket; /// use rocket::Rocket;
/// use rocket::fairing::AdHoc; /// use rocket::fairing::AdHoc;

View File

@ -13,7 +13,6 @@ use tokio::sync::mpsc;
/// # Example /// # Example
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # #![feature(proc_macro_hygiene)]
/// # #[macro_use] extern crate rocket; /// # #[macro_use] extern crate rocket;
/// # /// #
/// use rocket::shutdown::ShutdownHandle; /// use rocket::shutdown::ShutdownHandle;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::response::Redirect; use rocket::response::Redirect;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::Request; use rocket::request::Request;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::Response; use rocket::Response;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
use rocket; use rocket;
use rocket::{get, routes}; use rocket::{get, routes};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
const RESPONSE_STRING: &'static str = "This is the body. Hello, world!"; const RESPONSE_STRING: &'static str = "This is the body. Hello, world!";

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::FlashMessage; use rocket::request::FlashMessage;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::Form; use rocket::request::Form;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::Form; use rocket::request::Form;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::{http::Status, response::content}; use rocket::{http::Status, response::content};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::Form; use rocket::request::Form;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::Outcome::*; use rocket::Outcome::*;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] #[macro_use]
#[cfg(feature = "private-cookies")] #[cfg(feature = "private-cookies")]
extern crate rocket; extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
#[post("/", format = "application/json")] #[post("/", format = "application/json")]

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::response::Redirect; use rocket::response::Redirect;

View File

@ -1,4 +1,3 @@
#![feature(proc_macro_hygiene)]
#![allow(dead_code)] // This test is only here so that we can ensure it compiles. #![allow(dead_code)] // This test is only here so that we can ensure it compiles.
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::http::uri::Segments; use rocket::http::uri::Segments;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::request::{Form, LenientForm}; use rocket::request::{Form, LenientForm};

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::response::Redirect; use rocket::response::Redirect;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
mod common; mod common;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
mod common; mod common;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
mod common; mod common;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
#[macro_use] extern crate serde_derive; #[macro_use] extern crate serde_derive;

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
#[cfg(test)] #[cfg(test)]

Some files were not shown because too many files have changed in this diff Show More