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}};
// Specifies the minimum nightly version needed to compile Rocket.
const MIN_DATE: &'static str = "2018-10-05";
const MIN_VERSION: &'static str = "1.31.0-nightly";
const MIN_DATE: &'static str = "2020-05-20";
const MIN_VERSION: &'static str = "1.45.0-nightly";
macro_rules! err {
($version:expr, $date:expr, $msg:expr) => (

View File

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

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,19 +1,19 @@
error: expected `,`
--> $DIR/catchers.rs:6:25
--> $DIR/catchers.rs:4:25
|
6 | let _ = catchers![a b]; //~ ERROR expected
4 | let _ = catchers![a b]; //~ ERROR expected
| ^
error: expected identifier
--> $DIR/catchers.rs:8:26
--> $DIR/catchers.rs:6:26
|
8 | let _ = catchers![a::, ]; //~ ERROR expected identifier
6 | let _ = catchers![a::, ]; //~ ERROR expected identifier
| ^
error: unexpected end of input, expected identifier
--> $DIR/catchers.rs:9:13
--> $DIR/catchers.rs:7:13
|
9 | let _ = catchers![a::]; //~ ERROR expected identifier
7 | let _ = catchers![a::]; //~ ERROR expected identifier
| ^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

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

View File

@ -1,15 +1,15 @@
error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:11:5
|
11 | thing: u8,
| ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8`
|
= note: required by `rocket::response::Responder::respond_to`
--> $DIR/responder-types.rs:9:5
|
9 | thing: u8,
| ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8`
|
= note: required by `rocket::response::Responder::respond_to`
error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<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<'_>`
|
= 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`
error[E0277]: the trait bound `u8: rocket::response::Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:24:5
--> $DIR/responder-types.rs:22:5
|
24 | thing: u8,
22 | thing: u8,
| ^^^^^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `u8`
|
= note: required by `rocket::response::Responder::respond_to`
error[E0277]: the trait bound `rocket::http::Header<'_>: std::convert::From<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<'_>`
|
= 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`
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<'_>`
|
= 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`
error[E0277]: the trait bound `usize: rocket::response::Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:39:13
--> $DIR/responder-types.rs:37:13
|
39 | fn foo() -> usize { 0 }
37 | fn foo() -> usize { 0 }
| ^^^^^ the trait `rocket::response::Responder<'_, '_>` is not implemented for `usize`
|
= note: required by `rocket::handler::<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;
// Check a path is supplied, at least.

View File

@ -1,216 +1,216 @@
error: missing expected parameter: `path`
--> $DIR/route-attribute-general-syntax.rs:7:1
--> $DIR/route-attribute-general-syntax.rs:5:1
|
7 | #[get()] //~ ERROR missing expected parameter
5 | #[get()] //~ ERROR missing expected parameter
| ^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:13:1
--> $DIR/route-attribute-general-syntax.rs:11:1
|
13 | struct S;
11 | struct S;
| ^^^^^^
|
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:18:1
--> $DIR/route-attribute-general-syntax.rs:16:1
|
18 | enum A { }
16 | enum A { }
| ^^^^
|
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:23:1
--> $DIR/route-attribute-general-syntax.rs:21:1
|
23 | trait Foo { }
21 | trait Foo { }
| ^^^^^
|
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:28:1
--> $DIR/route-attribute-general-syntax.rs:26:1
|
28 | impl S { }
26 | impl S { }
| ^^^^
|
= help: #[get] can only be used on functions
error: expected key/value pair
--> $DIR/route-attribute-general-syntax.rs:34:12
--> $DIR/route-attribute-general-syntax.rs:32:12
|
34 | #[get("/", 123)] //~ ERROR expected
32 | #[get("/", 123)] //~ ERROR expected
| ^^^
error: expected key/value pair
--> $DIR/route-attribute-general-syntax.rs:37:12
--> $DIR/route-attribute-general-syntax.rs:35:12
|
37 | #[get("/", "/")] //~ ERROR expected
35 | #[get("/", "/")] //~ ERROR expected
| ^^^
error: unexpected keyed parameter: expected literal or identifier
--> $DIR/route-attribute-general-syntax.rs:40:7
--> $DIR/route-attribute-general-syntax.rs:38:7
|
40 | #[get(data = "<foo>", "/")] //~ ERROR unexpected keyed parameter
38 | #[get(data = "<foo>", "/")] //~ ERROR unexpected keyed parameter
| ^^^^^^^^^^^^^^
error: unexpected attribute parameter: `unknown`
--> $DIR/route-attribute-general-syntax.rs:43:12
--> $DIR/route-attribute-general-syntax.rs:41:12
|
43 | #[get("/", unknown = "foo")] //~ ERROR unexpected
41 | #[get("/", unknown = "foo")] //~ ERROR unexpected
| ^^^^^^^^^^^^^^^
error: malformed attribute
--> $DIR/route-attribute-general-syntax.rs:46:1
--> $DIR/route-attribute-general-syntax.rs:44:1
|
46 | #[get("/", ...)] //~ ERROR malformed
44 | #[get("/", ...)] //~ ERROR malformed
| ^^^^^^^^^^^^^^^^
|
= help: expected syntax: #[get(key = value, ..)]
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: handler arguments cannot be ignored
--> $DIR/route-attribute-general-syntax.rs:53:7
--> $DIR/route-attribute-general-syntax.rs:51:7
|
53 | fn c1(_: usize) {} //~ ERROR cannot be ignored
51 | fn c1(_: usize) {} //~ ERROR cannot be ignored
| ^^^^^^^^
|
= help: all handler arguments must be of the form: `ident: Type`
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:58:7
--> $DIR/route-attribute-general-syntax.rs:56:7
|
58 | #[get(100)] //~ ERROR expected string
56 | #[get(100)] //~ ERROR expected string
| ^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:61:7
--> $DIR/route-attribute-general-syntax.rs:59:7
|
61 | #[get('/')] //~ ERROR expected string
59 | #[get('/')] //~ ERROR expected string
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:64:19
--> $DIR/route-attribute-general-syntax.rs:62:19
|
64 | #[get("/", rank = "1")] //~ ERROR expected integer
62 | #[get("/", rank = "1")] //~ ERROR expected integer
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:67:19
--> $DIR/route-attribute-general-syntax.rs:65:19
|
67 | #[get("/", rank = '1')] //~ ERROR expected integer
65 | #[get("/", rank = '1')] //~ ERROR expected integer
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:72:21
--> $DIR/route-attribute-general-syntax.rs:70:21
|
72 | #[get("/", format = "applicationx-custom")] //~ ERROR invalid or unknown media type
70 | #[get("/", format = "applicationx-custom")] //~ ERROR invalid or unknown media type
| ^^^^^^^^^^^^^^^^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:75:21
--> $DIR/route-attribute-general-syntax.rs:73:21
|
75 | #[get("/", format = "")] //~ ERROR invalid or unknown media type
73 | #[get("/", format = "")] //~ ERROR invalid or unknown media type
| ^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:78:21
--> $DIR/route-attribute-general-syntax.rs:76:21
|
78 | #[get("/", format = "//")] //~ ERROR invalid or unknown media type
76 | #[get("/", format = "//")] //~ ERROR invalid or unknown media type
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:81:21
--> $DIR/route-attribute-general-syntax.rs:79:21
|
81 | #[get("/", format = "/")] //~ ERROR invalid or unknown media type
79 | #[get("/", format = "/")] //~ ERROR invalid or unknown media type
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:84:21
--> $DIR/route-attribute-general-syntax.rs:82:21
|
84 | #[get("/", format = "a/")] //~ ERROR invalid or unknown media type
82 | #[get("/", format = "a/")] //~ ERROR invalid or unknown media type
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:87:21
--> $DIR/route-attribute-general-syntax.rs:85:21
|
87 | #[get("/", format = "/a")] //~ ERROR invalid or unknown media type
85 | #[get("/", format = "/a")] //~ ERROR invalid or unknown media type
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:90:21
--> $DIR/route-attribute-general-syntax.rs:88:21
|
90 | #[get("/", format = "/a/")] //~ ERROR invalid or unknown media type
88 | #[get("/", format = "/a/")] //~ ERROR invalid or unknown media type
| ^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:93:21
--> $DIR/route-attribute-general-syntax.rs:91:21
|
93 | #[get("/", format = "a/b/")] //~ ERROR invalid or unknown media type
91 | #[get("/", format = "a/b/")] //~ ERROR invalid or unknown media type
| ^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:96:21
--> $DIR/route-attribute-general-syntax.rs:94:21
|
96 | #[get("/", format = "unknown")] //~ ERROR unknown media type
94 | #[get("/", format = "unknown")] //~ ERROR unknown media type
| ^^^^^^^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:99:21
--> $DIR/route-attribute-general-syntax.rs:97:21
|
99 | #[get("/", format = 12)] //~ ERROR expected string
97 | #[get("/", format = 12)] //~ ERROR expected string
| ^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:102:21
--> $DIR/route-attribute-general-syntax.rs:100:21
|
102 | #[get("/", format = 'j')] //~ ERROR expected string
100 | #[get("/", format = 'j')] //~ ERROR expected string
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:105:21
--> $DIR/route-attribute-general-syntax.rs:103:21
|
105 | #[get("/", format = "text//foo")] //~ ERROR invalid or unknown media type
103 | #[get("/", format = "text//foo")] //~ ERROR invalid or unknown media type
| ^^^^^^^^^^^
error: invalid HTTP method for route handlers
--> $DIR/route-attribute-general-syntax.rs:110:9
--> $DIR/route-attribute-general-syntax.rs:108:9
|
110 | #[route(CONNECT, "/")] //~ ERROR invalid HTTP method for route
108 | #[route(CONNECT, "/")] //~ ERROR invalid HTTP method for route
| ^^^^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: invalid HTTP method
--> $DIR/route-attribute-general-syntax.rs:114:9
--> $DIR/route-attribute-general-syntax.rs:112:9
|
114 | #[route(FIX, "/")] //~ ERROR invalid HTTP method
112 | #[route(FIX, "/")] //~ ERROR invalid HTTP method
| ^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal
--> $DIR/route-attribute-general-syntax.rs:118:9
--> $DIR/route-attribute-general-syntax.rs:116:9
|
118 | #[route("hi", "/")] //~ ERROR expected identifier
116 | #[route("hi", "/")] //~ ERROR expected identifier
| ^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal
--> $DIR/route-attribute-general-syntax.rs:122:9
--> $DIR/route-attribute-general-syntax.rs:120:9
|
122 | #[route("GET", "/")] //~ ERROR expected identifier
120 | #[route("GET", "/")] //~ ERROR expected identifier
| ^^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found integer literal
--> $DIR/route-attribute-general-syntax.rs:126:9
--> $DIR/route-attribute-general-syntax.rs:124:9
|
126 | #[route(120, "/")] //~ ERROR expected identifier
124 | #[route(120, "/")] //~ ERROR expected identifier
| ^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
// 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
--> $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>"
error: invalid path URI: expected token '/' but none was found at index 0
--> $DIR/route-path-bad-syntax.rs:11:8
|
11 | #[get("")] //~ ERROR invalid path URI
| ^
|
= help: expected path in origin form: "/path/<param>"
--> $DIR/route-path-bad-syntax.rs:9:8
|
9 | #[get("")] //~ ERROR invalid path URI
| ^
|
= help: expected path in origin form: "/path/<param>"
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>"
error: paths cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:19:7
--> $DIR/route-path-bad-syntax.rs:17:7
|
19 | #[get("/a///b")] //~ ERROR empty segments
17 | #[get("/a///b")] //~ ERROR empty segments
| ^^^^^^^^
|
= note: expected '/a/b', found '/a///b'
error: query cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:23:10
--> $DIR/route-path-bad-syntax.rs:21:10
|
23 | #[get("/?bat&&")] //~ ERROR empty segments
21 | #[get("/?bat&&")] //~ ERROR empty segments
| ^^^^^
error: query cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:26:10
--> $DIR/route-path-bad-syntax.rs:24:10
|
26 | #[get("/?bat&&")] //~ ERROR empty segments
24 | #[get("/?bat&&")] //~ ERROR empty segments
| ^^^^^
error: paths cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:29:7
--> $DIR/route-path-bad-syntax.rs:27:7
|
29 | #[get("/a/b//")] //~ ERROR empty segments
27 | #[get("/a/b//")] //~ ERROR empty segments
| ^^^^^^^^
|
= note: expected '/a/b', found '/a/b//'
error: invalid path URI: expected EOF but found '#' at index 3
--> $DIR/route-path-bad-syntax.rs:35:11
--> $DIR/route-path-bad-syntax.rs:33:11
|
35 | #[get("/!@#$%^&*()")] //~ ERROR invalid path URI
33 | #[get("/!@#$%^&*()")] //~ ERROR invalid path URI
| ^^^^^^^^^
|
= help: expected path in origin form: "/path/<param>"
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:39:9
--> $DIR/route-path-bad-syntax.rs:37:9
|
39 | #[get("/a%20b")] //~ ERROR invalid URI characters
37 | #[get("/a%20b")] //~ ERROR invalid URI characters
| ^^^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:44:11
--> $DIR/route-path-bad-syntax.rs:42:11
|
44 | #[get("/a?a%20b")] //~ ERROR invalid URI characters
42 | #[get("/a?a%20b")] //~ ERROR invalid URI characters
| ^^^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: component contains invalid URI characters
--> $DIR/route-path-bad-syntax.rs:49:11
--> $DIR/route-path-bad-syntax.rs:47:11
|
49 | #[get("/a?a+b")] //~ ERROR invalid URI characters
47 | #[get("/a?a+b")] //~ ERROR invalid URI characters
| ^^^
|
= note: components cannot contain reserved characters
= help: reserved characters include: '%', '+', '&', etc.
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:56:9
--> $DIR/route-path-bad-syntax.rs:54:9
|
56 | #[get("/<name>")] //~ ERROR unused dynamic parameter
54 | #[get("/<name>")] //~ ERROR unused dynamic parameter
| ^^^^^^
|
note: expected argument named `name` here
--> $DIR/route-path-bad-syntax.rs:57:7
--> $DIR/route-path-bad-syntax.rs:55:7
|
57 | fn h0(_name: usize) {} //~ NOTE expected argument named `name` here
55 | fn h0(_name: usize) {} //~ NOTE expected argument named `name` here
| ^^^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:59:11
--> $DIR/route-path-bad-syntax.rs:57:11
|
59 | #[get("/a?<r>")] //~ ERROR unused dynamic parameter
57 | #[get("/a?<r>")] //~ ERROR unused dynamic parameter
| ^^^
|
note: expected argument named `r` here
--> $DIR/route-path-bad-syntax.rs:60:1
--> $DIR/route-path-bad-syntax.rs:58:1
|
60 | fn h1() {} //~ NOTE expected argument named `r` here
58 | fn h1() {} //~ NOTE expected argument named `r` here
| ^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:62:22
--> $DIR/route-path-bad-syntax.rs:60:22
|
62 | #[post("/a", data = "<test>")] //~ ERROR unused dynamic parameter
60 | #[post("/a", data = "<test>")] //~ ERROR unused dynamic parameter
| ^^^^^^
|
note: expected argument named `test` here
--> $DIR/route-path-bad-syntax.rs:63:1
--> $DIR/route-path-bad-syntax.rs:61:1
|
63 | fn h2() {} //~ NOTE expected argument named `test` here
61 | fn h2() {} //~ NOTE expected argument named `test` here
| ^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:65:9
--> $DIR/route-path-bad-syntax.rs:63:9
|
65 | #[get("/<_r>")] //~ ERROR unused dynamic parameter
63 | #[get("/<_r>")] //~ ERROR unused dynamic parameter
| ^^^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:66:1
--> $DIR/route-path-bad-syntax.rs:64:1
|
66 | fn h3() {} //~ NOTE expected argument named `_r` here
64 | fn h3() {} //~ NOTE expected argument named `_r` here
| ^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:68:9
--> $DIR/route-path-bad-syntax.rs:66:9
|
68 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
66 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
| ^^^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:70:1
--> $DIR/route-path-bad-syntax.rs:68:1
|
70 | fn h4() {} //~ NOTE expected argument named `_r` here
68 | fn h4() {} //~ NOTE expected argument named `_r` here
| ^^^^^^^^^^
error: unused dynamic parameter
--> $DIR/route-path-bad-syntax.rs:68:14
--> $DIR/route-path-bad-syntax.rs:66:14
|
68 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
66 | #[get("/<_r>/<b>")] //~ ERROR unused dynamic parameter
| ^^^
|
note: expected argument named `b` here
--> $DIR/route-path-bad-syntax.rs:70:1
--> $DIR/route-path-bad-syntax.rs:68:1
|
70 | fn h4() {} //~ NOTE expected argument named `_r` here
68 | fn h4() {} //~ NOTE expected argument named `_r` here
| ^^^^^^^^^^
error: `foo_.` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:75:9
--> $DIR/route-path-bad-syntax.rs:73:9
|
75 | #[get("/<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
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
error: `!` is not a valid identifier
--> $DIR/route-path-bad-syntax.rs:83:9
--> $DIR/route-path-bad-syntax.rs:81:9
|
83 | #[get("/<!>")] //~ ERROR `!` is not a valid identifier
81 | #[get("/<!>")] //~ ERROR `!` is not a valid identifier
| ^^^
|
= help: parameter names must be valid identifiers
error: `name>:<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
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>'
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>'
error: parameter is missing a closing bracket
--> $DIR/route-path-bad-syntax.rs:101:20
|
101 | #[get("/", data = "<foo")] //~ ERROR missing a closing bracket
| ^^^^
|
= help: did you mean '<foo>'?
--> $DIR/route-path-bad-syntax.rs:99:20
|
99 | #[get("/", data = "<foo")] //~ ERROR missing a closing bracket
| ^^^^
|
= help: did you mean '<foo>'?
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
error: parameters must be named
--> $DIR/route-path-bad-syntax.rs:111:9
--> $DIR/route-path-bad-syntax.rs:109:9
|
111 | #[get("/<_>")] //~ ERROR must be named
109 | #[get("/<_>")] //~ ERROR must be named
| ^^^
|
= help: use a name such as `_guard` or `_param`
error: parameter names cannot be empty
--> $DIR/route-path-bad-syntax.rs:116:9
--> $DIR/route-path-bad-syntax.rs:114:9
|
116 | #[get("/<>")] //~ ERROR cannot be empty
114 | #[get("/<>")] //~ ERROR cannot be empty
| ^^
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:119:9
--> $DIR/route-path-bad-syntax.rs:117:9
|
119 | #[get("/<id><")] //~ ERROR malformed parameter
117 | #[get("/<id><")] //~ ERROR malformed parameter
| ^^^^^
|
= help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:124:9
--> $DIR/route-path-bad-syntax.rs:122:9
|
124 | #[get("/<<<<id><")] //~ ERROR malformed parameter
122 | #[get("/<<<<id><")] //~ ERROR malformed parameter
| ^^^^^^^^
|
= help: parameters must be of the form '<param>'
= help: identifiers cannot contain '<' or '>'
error: malformed parameter or identifier
--> $DIR/route-path-bad-syntax.rs:129:9
--> $DIR/route-path-bad-syntax.rs:127:9
|
129 | #[get("/<>name><")] //~ ERROR malformed parameter
127 | #[get("/<>name><")] //~ ERROR malformed parameter
| ^^^^^^^^
|
= help: parameters must be of the form '<param>'

View File

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

View File

@ -1,63 +1,63 @@
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:8:7
--> $DIR/route-type-errors.rs:6:7
|
8 | fn f0(foo: Q) {} //~ ERROR FromParam
6 | fn f0(foo: Q) {} //~ ERROR FromParam
| ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromSegments<'_>` is not satisfied
--> $DIR/route-type-errors.rs:11:7
|
11 | fn f1(foo: Q) {} //~ ERROR FromSegments
| ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q`
--> $DIR/route-type-errors.rs:9:7
|
9 | fn f1(foo: Q) {} //~ ERROR FromSegments
| ^^^^^^ the trait `rocket::request::FromSegments<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromFormValue<'_>` is not satisfied
--> $DIR/route-type-errors.rs:14:7
--> $DIR/route-type-errors.rs:12:7
|
14 | fn f2(foo: Q) {} //~ ERROR FromFormValue
12 | fn f2(foo: Q) {} //~ ERROR FromFormValue
| ^^^^^^ the trait `rocket::request::FromFormValue<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromQuery<'_>` is not satisfied
--> $DIR/route-type-errors.rs:17:7
--> $DIR/route-type-errors.rs:15:7
|
17 | fn f3(foo: Q) {} //~ ERROR FromQuery
15 | fn f3(foo: Q) {} //~ ERROR FromQuery
| ^^^^^^ the trait `rocket::request::FromQuery<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::data::FromDataSimple` is not satisfied
--> $DIR/route-type-errors.rs:20:7
--> $DIR/route-type-errors.rs:18:7
|
20 | fn f4(foo: Q) {} //~ ERROR FromData
18 | fn f4(foo: Q) {} //~ ERROR FromData
| ^^^^^^ the trait `rocket::data::FromDataSimple` is not implemented for `Q`
|
= note: required because of the requirements on the impl of `rocket::data::FromData<'_>` for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied
--> $DIR/route-type-errors.rs:23:7
--> $DIR/route-type-errors.rs:21:7
|
23 | fn f5(a: Q, foo: Q) {}
21 | fn f5(a: Q, foo: Q) {}
| ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:23:13
--> $DIR/route-type-errors.rs:21:13
|
23 | fn f5(a: Q, foo: Q) {}
21 | fn f5(a: Q, foo: Q) {}
| ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromRequest<'_, '_>` is not satisfied
--> $DIR/route-type-errors.rs:28:7
--> $DIR/route-type-errors.rs:26:7
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^ the trait `rocket::request::FromRequest<'_, '_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:28:13
--> $DIR/route-type-errors.rs:26:13
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error[E0277]: the trait bound `Q: rocket::request::FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:28:34
--> $DIR/route-type-errors.rs:26:34
|
28 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
26 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^^^^^^ the trait `rocket::request::FromParam<'_>` is not implemented for `Q`
error: aborting due to 10 previous errors

View File

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

View File

@ -1,44 +1,44 @@
warning: 'application/x-custom' is not a known media type
--> $DIR/route-warnings.rs:9:21
--> $DIR/route-warnings.rs:7:21
|
9 | #[get("/", format = "application/x-custom")] //~ WARNING not a known media type
7 | #[get("/", format = "application/x-custom")] //~ WARNING not a known media type
| ^^^^^^^^^^^^^^^^^^^^^^
warning: 'x-custom/plain' is not a known media type
--> $DIR/route-warnings.rs:12:21
--> $DIR/route-warnings.rs:10:21
|
12 | #[get("/", format = "x-custom/plain")] //~ WARNING not a known media type
10 | #[get("/", format = "x-custom/plain")] //~ WARNING not a known media type
| ^^^^^^^^^^^^^^^^
warning: 'x-custom/x-custom' is not a known media type
--> $DIR/route-warnings.rs:15:21
--> $DIR/route-warnings.rs:13:21
|
15 | #[get("/", format = "x-custom/x-custom")] //~ WARNING not a known media type
13 | #[get("/", format = "x-custom/x-custom")] //~ WARNING not a known media type
| ^^^^^^^^^^^^^^^^^^^
warning: `data` used with non-payload-supporting method
--> $DIR/route-warnings.rs:20:12
--> $DIR/route-warnings.rs:18:12
|
20 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
18 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^^^^^^^^^^^^^
|
note: 'GET' does not typically support payloads
--> $DIR/route-warnings.rs:20:3
--> $DIR/route-warnings.rs:18:3
|
20 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
18 | #[get("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: `data` used with non-payload-supporting method
--> $DIR/route-warnings.rs:23:13
--> $DIR/route-warnings.rs:21:13
|
23 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
21 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^^^^^^^^^^^^^
|
note: 'HEAD' does not typically support payloads
--> $DIR/route-warnings.rs:23:3
--> $DIR/route-warnings.rs:21:3
|
23 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
21 | #[head("/", data = "<_foo>")] //~ WARNING used with non-payload-supporting method
| ^^^^
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

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

View File

@ -1,19 +1,19 @@
error: expected `,`
--> $DIR/routes.rs:6:23
--> $DIR/routes.rs:4:23
|
6 | let _ = routes![a b]; //~ ERROR expected `,`
4 | let _ = routes![a b]; //~ ERROR expected `,`
| ^
error: expected identifier
--> $DIR/routes.rs:8:24
--> $DIR/routes.rs:6:24
|
8 | let _ = routes![a::, ]; //~ ERROR expected identifier
6 | let _ = routes![a::, ]; //~ ERROR expected identifier
| ^
error: unexpected end of input, expected identifier
--> $DIR/routes.rs:9:13
--> $DIR/routes.rs:7:13
|
9 | let _ = routes![a::]; //~ ERROR expected identifier
7 | let _ = routes![a::]; //~ ERROR expected identifier
| ^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

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

View File

@ -1,7 +1,7 @@
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`
|
= 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`
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`
|
= 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`
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`
|
= 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`
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`
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`
|
= 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>`
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`
|
= 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>`
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`
|
= 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`
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`
|
= 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`
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`
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`
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`
...
81 | uri!(other_q: rest = _, id = 100);
79 | uri!(other_q: rest = _, id = 100);
| ---------------------------------- in this macro invocation
|
::: $ROCKET/core/http/src/uri/uri_display.rs:469:40
::: $ROCKET/core/http/src/uri/uri_display.rs:465:40
|
469 | pub fn assert_ignorable<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`
|
= 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
--> $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`
...
83 | uri!(other_q: rest = S, id = _);
81 | uri!(other_q: rest = S, id = _);
| -------------------------------- in this macro invocation
|
::: $ROCKET/core/http/src/uri/uri_display.rs:469:40
::: $ROCKET/core/http/src/uri/uri_display.rs:465:40
|
469 | pub fn assert_ignorable<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`
|
= 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
--> $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`
error: aborting due to 13 previous errors

View File

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

View File

@ -1,238 +1,238 @@
error: path parameters cannot be ignored
--> $DIR/typed-uris-bad-params.rs:79:37
--> $DIR/typed-uris-bad-params.rs:77:37
|
79 | uri!(optionals: id = 10, name = _);
77 | uri!(optionals: id = 10, name = _);
| ^
error: path parameters cannot be ignored
--> $DIR/typed-uris-bad-params.rs:76:26
--> $DIR/typed-uris-bad-params.rs:74:26
|
76 | uri!(optionals: id = _, name = "bob".into());
74 | uri!(optionals: id = _, name = "bob".into());
| ^
error: invalid parameters for `has_two` route uri
--> $DIR/typed-uris-bad-params.rs:72:19
--> $DIR/typed-uris-bad-params.rs:70:19
|
72 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters
70 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:72:29
--> $DIR/typed-uris-bad-params.rs:70:29
|
72 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters
70 | uri!(has_two: id = 100, cookies = "hi"); //~ ERROR invalid parameters
| ^^^^^^^
error: invalid parameters for `has_two` route uri
--> $DIR/typed-uris-bad-params.rs:67:19
--> $DIR/typed-uris-bad-params.rs:65:19
|
67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:67:19
--> $DIR/typed-uris-bad-params.rs:65:19
|
67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
| ^^^^^^^
help: duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:67:45
--> $DIR/typed-uris-bad-params.rs:65:45
|
67 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
65 | uri!(has_two: cookies = "hi", id = 100, id = 10, id = 10); //~ ERROR invalid parameters
| ^^ ^^
error: invalid parameters for `has_two` route uri
--> $DIR/typed-uris-bad-params.rs:64:19
--> $DIR/typed-uris-bad-params.rs:62:19
|
64 | uri!(has_two: name = "hi"); //~ ERROR invalid parameters
62 | uri!(has_two: name = "hi"); //~ ERROR invalid parameters
| ^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `id`
error: invalid parameters for `has_two` route uri
--> $DIR/typed-uris-bad-params.rs:60:19
--> $DIR/typed-uris-bad-params.rs:58:19
|
60 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters
58 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:60:29
--> $DIR/typed-uris-bad-params.rs:58:29
|
60 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters
58 | uri!(has_two: id = 100, id = 100, ); //~ ERROR invalid parameters
| ^^
error: invalid parameters for `has_one_guarded` route uri
--> $DIR/typed-uris-bad-params.rs:57:27
--> $DIR/typed-uris-bad-params.rs:55:27
|
57 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters
55 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:57:37
--> $DIR/typed-uris-bad-params.rs:55:37
|
57 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters
55 | uri!(has_one_guarded: id = 100, cookies = "hi"); //~ ERROR invalid parameters
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
--> $DIR/typed-uris-bad-params.rs:54:27
--> $DIR/typed-uris-bad-params.rs:52:27
|
54 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters
52 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:54:27
--> $DIR/typed-uris-bad-params.rs:52:27
|
54 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters
52 | uri!(has_one_guarded: cookies = "hi", id = 100); //~ ERROR invalid parameters
| ^^^^^^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:50:19
--> $DIR/typed-uris-bad-params.rs:48:19
|
50 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters
48 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters
| ^^^^^^^^^^^
|
= note: uri parameters are: id: i32
= help: missing parameter: `id`
help: unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:50:19
--> $DIR/typed-uris-bad-params.rs:48:19
|
50 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters
48 | uri!(has_one: name = "hi"); //~ ERROR invalid parameters
| ^^^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:47:19
--> $DIR/typed-uris-bad-params.rs:45:19
|
47 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters
45 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:47:29
--> $DIR/typed-uris-bad-params.rs:45:29
|
47 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters
45 | uri!(has_one: id = 100, id = 100, ); //~ ERROR invalid parameters
| ^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:44:19
--> $DIR/typed-uris-bad-params.rs:42:19
|
44 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters
42 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:44:29
--> $DIR/typed-uris-bad-params.rs:42:29
|
44 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters
42 | uri!(has_one: id = 100, id = 100); //~ ERROR invalid parameters
| ^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:40:19
--> $DIR/typed-uris-bad-params.rs:38:19
|
40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameters: `name`, `age`
--> $DIR/typed-uris-bad-params.rs:40:19
--> $DIR/typed-uris-bad-params.rs:38:19
|
40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
| ^^^^ ^^^
help: duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:40:51
--> $DIR/typed-uris-bad-params.rs:38:51
|
40 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
38 | uri!(has_one: name = 100, age = 50, id = 100, id = 50); //~ ERROR invalid parameters
| ^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:37:19
--> $DIR/typed-uris-bad-params.rs:35:19
|
37 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters
35 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameters: `name`, `age`
--> $DIR/typed-uris-bad-params.rs:37:19
--> $DIR/typed-uris-bad-params.rs:35:19
|
37 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters
35 | uri!(has_one: name = 100, age = 50, id = 100); //~ ERROR invalid parameters
| ^^^^ ^^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:34:19
--> $DIR/typed-uris-bad-params.rs:32:19
|
34 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters
32 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:34:19
--> $DIR/typed-uris-bad-params.rs:32:19
|
34 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters
32 | uri!(has_one: name = 100, id = 100); //~ ERROR invalid parameters
| ^^^^
error: invalid parameters for `has_one` route uri
--> $DIR/typed-uris-bad-params.rs:31:19
--> $DIR/typed-uris-bad-params.rs:29:19
|
31 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters
29 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:31:29
--> $DIR/typed-uris-bad-params.rs:29:29
|
31 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters
29 | uri!(has_one: id = 100, name = "hi"); //~ ERROR invalid parameters
| ^^^^
error: `has_two` route uri expects 2 parameters but 1 was supplied
--> $DIR/typed-uris-bad-params.rs:29:19
--> $DIR/typed-uris-bad-params.rs:27:19
|
29 | uri!(has_two: 10); //~ ERROR expects 2 parameters but 1
27 | uri!(has_two: 10); //~ ERROR expects 2 parameters but 1
| ^^
|
= note: expected parameters: id: i32, name: String
error: `has_two` route uri expects 2 parameters but 3 were supplied
--> $DIR/typed-uris-bad-params.rs:28:19
--> $DIR/typed-uris-bad-params.rs:26:19
|
28 | uri!(has_two: 10, "hi", "there"); //~ ERROR expects 2 parameters but 3
26 | uri!(has_two: 10, "hi", "there"); //~ ERROR expects 2 parameters but 3
| ^^^^^^^^^^^^^^^^^
|
= note: expected parameters: id: i32, name: String
error: `has_one_guarded` route uri expects 1 parameter but 2 were supplied
--> $DIR/typed-uris-bad-params.rs:26:27
--> $DIR/typed-uris-bad-params.rs:24:27
|
26 | uri!(has_one_guarded: "hi", 100); //~ ERROR expects 1 parameter but 2
24 | uri!(has_one_guarded: "hi", 100); //~ ERROR expects 1 parameter but 2
| ^^^^^^^^^
|
= note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 2 were supplied
--> $DIR/typed-uris-bad-params.rs:25:19
--> $DIR/typed-uris-bad-params.rs:23:19
|
25 | uri!(has_one: "Hello", 23, ); //~ ERROR expects 1 parameter but 2
23 | uri!(has_one: "Hello", 23, ); //~ ERROR expects 1 parameter but 2
| ^^^^^^^^^^^^
|
= note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 2 were supplied
--> $DIR/typed-uris-bad-params.rs:24:19
--> $DIR/typed-uris-bad-params.rs:22:19
|
24 | uri!(has_one: 1, 23); //~ ERROR expects 1 parameter but 2
22 | uri!(has_one: 1, 23); //~ ERROR expects 1 parameter but 2
| ^^^^^
|
= note: expected parameter: id: i32
error: `has_one` route uri expects 1 parameter but 0 were supplied
--> $DIR/typed-uris-bad-params.rs:22:10
--> $DIR/typed-uris-bad-params.rs:20:10
|
22 | uri!(has_one); //~ ERROR expects 1 parameter but 0
20 | uri!(has_one); //~ ERROR expects 1 parameter but 0
| ^^^^^^^
|
= note: expected parameter: id: i32

View File

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

View File

@ -1,65 +1,65 @@
error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:9:18
--> $DIR/typed-uris-invalid-syntax.rs:7:18
|
9 | uri!(simple: id = 100, "Hello"); //~ ERROR named and unnamed
7 | uri!(simple: id = 100, "Hello"); //~ ERROR named and unnamed
| ^^^^^^^^^^^^^^^^^
error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:10:18
|
10 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed
| ^^^^^^^^^^^^^^^^^
--> $DIR/typed-uris-invalid-syntax.rs:8:18
|
8 | uri!(simple: "Hello", id = 100); //~ ERROR named and unnamed
| ^^^^^^^^^^^^^^^^^
error: expected `:`
--> $DIR/typed-uris-invalid-syntax.rs:11:16
|
11 | uri!(simple,); //~ ERROR expected `:`
| ^
--> $DIR/typed-uris-invalid-syntax.rs:9:16
|
9 | uri!(simple,); //~ ERROR expected `:`
| ^
error: expected argument list after `:`
--> $DIR/typed-uris-invalid-syntax.rs:12:16
--> $DIR/typed-uris-invalid-syntax.rs:10:16
|
12 | uri!(simple:); //~ ERROR argument list
10 | uri!(simple:); //~ ERROR argument list
| ^
error: unexpected end of input: expected ',' followed by route path
--> $DIR/typed-uris-invalid-syntax.rs:13:10
--> $DIR/typed-uris-invalid-syntax.rs:11:10
|
13 | uri!("/mount"); //~ ERROR route path
11 | uri!("/mount"); //~ ERROR route path
| ^^^^^^^^
error: unexpected end of input, expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:14:5
--> $DIR/typed-uris-invalid-syntax.rs:12:5
|
14 | uri!("/mount",); //~ ERROR expected identifier
12 | uri!("/mount",); //~ ERROR expected identifier
| ^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid mount point; mount points must be static, absolute URIs: `/example`
--> $DIR/typed-uris-invalid-syntax.rs:15:10
--> $DIR/typed-uris-invalid-syntax.rs:13:10
|
15 | uri!("mount", simple); //~ invalid mount point
13 | uri!("mount", simple); //~ invalid mount point
| ^^^^^^^
error: invalid mount point; mount points must be static, absolute URIs: `/example`
--> $DIR/typed-uris-invalid-syntax.rs:16:10
--> $DIR/typed-uris-invalid-syntax.rs:14:10
|
16 | uri!("/mount/<id>", simple); //~ invalid mount point
14 | uri!("/mount/<id>", simple); //~ invalid mount point
| ^^^^^^^^^^^^^
error: unexpected end of input, call to `uri!` cannot be empty
--> $DIR/typed-uris-invalid-syntax.rs:17:5
--> $DIR/typed-uris-invalid-syntax.rs:15:5
|
17 | uri!(); //~ unexpected end of input
15 | uri!(); //~ unexpected end of input
| ^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected end of input, expected expression
--> $DIR/typed-uris-invalid-syntax.rs:18:5
--> $DIR/typed-uris-invalid-syntax.rs:16:5
|
18 | uri!(simple: id = ); //~ expected expression
16 | uri!(simple: id = ); //~ expected expression
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -137,9 +137,9 @@ error[E0277]: the trait bound `Foo1: rocket::http::uri::UriDisplay<rocket::http:
5 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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)]
| ^^^^^^^^^^^^^^ 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`
|
= 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;
use rocket::http::RawStr;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,4 @@
#![feature(test)]
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
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.
const MIN_DATE: &'static str = "2019-11-24";
const MIN_VERSION: &'static str = "1.41.0-nightly";
const MIN_DATE: &'static str = "2020-05-20";
const MIN_VERSION: &'static str = "1.45.0-nightly";
macro_rules! err {
($version:expr, $date:expr, $msg:expr) => (

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
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;
use rocket::request::FlashMessage;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]
#[macro_use] extern crate rocket;
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.
#[macro_use] extern crate rocket;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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