Improve 'sync_db_pools' codegen. Update UI tests.

This commit is contained in:
Sergio Benitez 2024-05-02 15:11:00 -07:00
parent a811a1810d
commit 7b17de6699
46 changed files with 2371 additions and 1227 deletions

View File

@ -1,11 +1,11 @@
error: invalid value: expected string literal
--> $DIR/database-syntax.rs:4:12
--> tests/ui-fail-stable/database-syntax.rs:4:12
|
4 | #[database(123)]
| ^^^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:3:10
--> tests/ui-fail-stable/database-syntax.rs:3:10
|
3 | #[derive(Database)]
| ^^^^^^^^
@ -13,13 +13,13 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> $DIR/database-syntax.rs:8:25
--> tests/ui-fail-stable/database-syntax.rs:8:25
|
8 | #[database("some-name", "another")]
| ^^^^^^^^^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:7:10
--> tests/ui-fail-stable/database-syntax.rs:7:10
|
7 | #[derive(Database)]
| ^^^^^^^^
@ -27,13 +27,13 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `name`
--> $DIR/database-syntax.rs:12:25
--> tests/ui-fail-stable/database-syntax.rs:12:25
|
12 | #[database("some-name", name = "another")]
| ^^^^
| ^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:11:10
--> tests/ui-fail-stable/database-syntax.rs:11:10
|
11 | #[derive(Database)]
| ^^^^^^^^
@ -41,13 +41,14 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: enums are not supported
--> $DIR/database-syntax.rs:16:1
--> tests/ui-fail-stable/database-syntax.rs:16:1
|
16 | #[database("foo")]
| ^
16 | / #[database("foo")]
17 | | enum D { }
| |___________^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:15:10
--> tests/ui-fail-stable/database-syntax.rs:15:10
|
15 | #[derive(Database)]
| ^^^^^^^^
@ -55,13 +56,13 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: missing `#[database("name")]` attribute
--> $DIR/database-syntax.rs:20:1
--> tests/ui-fail-stable/database-syntax.rs:20:1
|
20 | struct E(deadpool_postgres::Pool);
| ^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:19:10
--> tests/ui-fail-stable/database-syntax.rs:19:10
|
19 | #[derive(Database)]
| ^^^^^^^^
@ -69,13 +70,14 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: struct must have exactly one unnamed field
--> $DIR/database-syntax.rs:23:1
--> tests/ui-fail-stable/database-syntax.rs:23:1
|
23 | #[database("foo")]
| ^
23 | / #[database("foo")]
24 | | struct F;
| |_________^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:22:10
--> tests/ui-fail-stable/database-syntax.rs:22:10
|
22 | #[derive(Database)]
| ^^^^^^^^
@ -83,13 +85,14 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: struct must have exactly one unnamed field
--> $DIR/database-syntax.rs:27:1
--> tests/ui-fail-stable/database-syntax.rs:27:1
|
27 | #[database("foo")]
| ^
27 | / #[database("foo")]
28 | | struct G(deadpool_postgres::Pool, deadpool_postgres::Pool);
| |___________________________________________________________^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:26:10
--> tests/ui-fail-stable/database-syntax.rs:26:10
|
26 | #[derive(Database)]
| ^^^^^^^^
@ -97,13 +100,16 @@ error: [note] error occurred while deriving `Database`
= note: this error originates in the derive macro `Database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: named structs are not supported
--> $DIR/database-syntax.rs:31:1
--> tests/ui-fail-stable/database-syntax.rs:31:1
|
31 | #[database("foo")]
| ^
31 | / #[database("foo")]
32 | | struct H {
33 | | foo: deadpool_postgres::Pool,
34 | | }
| |_^
error: [note] error occurred while deriving `Database`
--> $DIR/database-syntax.rs:30:10
--> tests/ui-fail-stable/database-syntax.rs:30:10
|
30 | #[derive(Database)]
| ^^^^^^^^

View File

@ -73,15 +73,16 @@ pub fn database_attr(attr: TokenStream, input: TokenStream) -> Result<TokenStrea
let rocket = quote!(#root::rocket);
let request_guard_type = quote_spanned! { span =>
#(#attrs)* #vis struct #guard_type(#root::Connection<Self, #conn_type>);
#(#attrs)* #vis struct #guard_type(#[allow(dead_code)] #root::Connection<Self, #conn_type>);
};
let pool = quote_spanned!(span => #root::ConnectionPool<Self, #conn_type>);
let conn = quote_spanned!(span => #root::Connection<Self, #conn_type>);
Ok(quote! {
Ok(quote_spanned! { span =>
#request_guard_type
#[allow(dead_code)]
impl #guard_type {
/// Returns a fairing that initializes the database connection pool.
pub fn fairing() -> impl #rocket::fairing::Fairing {

View File

@ -10,17 +10,22 @@ note: required by a bound in `rocket_sync_db_pools::Connection`
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ the trait `Poolable` is not implemented for `Vec<i32>`
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
note: required by a bound in `rocket_sync_db_pools::Connection`
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Unknown: Poolable` is not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
@ -34,6 +39,66 @@ note: required by a bound in `ConnectionPool`
| pub struct ConnectionPool<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `ConnectionPool`
error[E0599]: the method `run` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ method cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ the trait `Poolable` is not implemented for `Vec<i32>`
|
note: required by a bound in `rocket_sync_db_pools::Connection`
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
@ -45,3 +110,158 @@ note: required by a bound in `ConnectionPool`
|
| pub struct ConnectionPool<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `ConnectionPool`
error[E0599]: the method `run` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ method cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `pool` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `from_request` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: FromRequest<'_>`
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
which is required by `rocket_sync_db_pools::Connection<A, Unknown>: FromRequest<'_>`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `abort` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: Sentinel`
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
which is required by `rocket_sync_db_pools::Connection<A, Unknown>: Sentinel`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: items from traits can only be used if the trait is in scope
help: trait `DefaultSentinel` which provides `abort` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::rocket_sync_db_pools::rocket::sentinel::resolution::DefaultSentinel;
|
error[E0599]: the function or associated item `pool` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `from_request` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: FromRequest<'_>`
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
which is required by `rocket_sync_db_pools::Connection<B, Vec<i32>>: FromRequest<'_>`
error[E0599]: the function or associated item `abort` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-nightly/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: Sentinel`
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
which is required by `rocket_sync_db_pools::Connection<B, Vec<i32>>: Sentinel`
= help: items from traits can only be used if the trait is in scope
help: trait `DefaultSentinel` which provides `abort` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::rocket_sync_db_pools::rocket::sentinel::resolution::DefaultSentinel;
|

View File

@ -28,7 +28,7 @@ error: `database` attribute can only be used on structs
--> tests/ui-fail-stable/database-syntax.rs:40:1
|
40 | enum Foo { }
| ^^^^
| ^^^^^^^^^^^^^
error: `database` attribute can only be applied to structs with exactly one unnamed field
= help: example: `struct MyDatabase(diesel::SqliteConnection);`
@ -41,16 +41,16 @@ error: `database` attribute can only be used on structs
--> tests/ui-fail-stable/database-syntax.rs:46:1
|
46 | union Baz { }
| ^^^^^
| ^^^^^^^^^^^^^^
error: `database` attribute cannot be applied to structs with generics
--> tests/ui-fail-stable/database-syntax.rs:49:9
|
49 | struct E<'r>(&'r str);
| ^
| ^^^^
error: `database` attribute cannot be applied to structs with generics
--> tests/ui-fail-stable/database-syntax.rs:52:9
|
52 | struct F<T>(T);
| ^
| ^^^

View File

@ -10,17 +10,22 @@ note: required by a bound in `rocket_sync_db_pools::Connection`
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
9 | struct B(Vec<i32>);
| ^^^ the trait `Poolable` is not implemented for `Vec<i32>`
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
note: required by a bound in `rocket_sync_db_pools::Connection`
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Unknown: Poolable` is not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
@ -34,14 +39,229 @@ note: required by a bound in `ConnectionPool`
| pub struct ConnectionPool<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `ConnectionPool`
error[E0599]: the method `run` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ method cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^ the trait `Poolable` is not implemented for `Vec<i32>`
| ^^^^^^^^ the trait `Poolable` is not implemented for `Vec<i32>`
|
note: required by a bound in `rocket_sync_db_pools::Connection`
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `Connection`
error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ the trait `Poolable` is not implemented for `Vec<i32>`
|
note: required by a bound in `ConnectionPool`
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct ConnectionPool<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `ConnectionPool`
error[E0599]: the method `run` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ method cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `pool` exists for struct `ConnectionPool<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `ConnectionPool<A, Unknown>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `from_request` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: FromRequest<'_>`
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
which is required by `rocket_sync_db_pools::Connection<A, Unknown>: FromRequest<'_>`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: the function or associated item `abort` exists for struct `Connection<A, Unknown>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:6:10
|
3 | struct Unknown;
| -------------- doesn't satisfy `Unknown: Poolable`
...
6 | struct A(Unknown);
| ^^^^^^^ function or associated item cannot be called on `Connection<A, Unknown>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: Sentinel`
|
= note: the following trait bounds were not satisfied:
`Unknown: Poolable`
which is required by `rocket_sync_db_pools::Connection<A, Unknown>: Sentinel`
note: the trait `Poolable` must be implemented
--> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs
|
| pub trait Poolable: Send + Sized + 'static {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: items from traits can only be used if the trait is in scope
help: trait `DefaultSentinel` which provides `abort` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::rocket_sync_db_pools::rocket::sentinel::resolution::DefaultSentinel;
|
error[E0599]: the function or associated item `pool` exists for struct `ConnectionPool<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `ConnectionPool<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
error[E0599]: the function or associated item `from_request` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: FromRequest<'_>`
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
which is required by `rocket_sync_db_pools::Connection<B, Vec<i32>>: FromRequest<'_>`
error[E0599]: the function or associated item `abort` exists for struct `Connection<B, Vec<i32>>`, but its trait bounds were not satisfied
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^^^^^^ function or associated item cannot be called on `Connection<B, Vec<i32>>` due to unsatisfied trait bounds
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
| pub struct Connection<K, C: Poolable> {
| ------------------------------------- doesn't satisfy `_: Sentinel`
|
::: $RUST/alloc/src/vec/mod.rs
|
| pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> {
| ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec<i32>: Poolable`
|
= note: the following trait bounds were not satisfied:
`Vec<i32>: Poolable`
which is required by `rocket_sync_db_pools::Connection<B, Vec<i32>>: Sentinel`
= help: items from traits can only be used if the trait is in scope
help: trait `DefaultSentinel` which provides `abort` is implemented but not in scope; perhaps you want to import it
|
1 + use crate::rocket_sync_db_pools::rocket::sentinel::resolution::DefaultSentinel;
|

View File

@ -11,15 +11,15 @@ impl r2d2::ManageConnection for Manager {
type Error = std::convert::Infallible;
fn connect(&self) -> Result<Self::Connection, Self::Error> { Ok(Connection) }
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> { Ok(()) }
fn has_broken(&self, conn: &mut Self::Connection) -> bool { true }
fn is_valid(&self, _: &mut Self::Connection) -> Result<(), Self::Error> { Ok(()) }
fn has_broken(&self, _: &mut Self::Connection) -> bool { true }
}
impl Poolable for Connection {
type Manager = Manager;
type Error = std::convert::Infallible;
fn pool(db_name: &str, rocket: &Rocket<Build>) -> PoolResult<Self> {
fn pool(_: &str, _: &Rocket<Build>) -> PoolResult<Self> {
todo!()
}
}

View File

@ -5,7 +5,6 @@ mod sqlite_shutdown_test {
use rocket_sync_db_pools::database;
#[database("test")]
#[allow(dead_code)]
struct Pool(diesel::SqliteConnection);
async fn rocket() -> Rocket<Build> {

View File

@ -22,6 +22,7 @@ note: this function is not `main`
|
11 | async fn foo() { }
| ^^^
= note: apply `#[suppress(arbitrary_main)]` before the item to suppress this lint
= note: this warning originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to `async` functions
@ -109,7 +110,15 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks
--> tests/ui-fail-nightly/async-entry.rs:73:42
|
72 | fn rocket() -> _ {
| ------ this is not `async`
| ---------------- this is not `async`
73 | let _ = rocket::build().launch().await;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> tests/ui-fail-nightly/async-entry.rs:73:42
|
72 | fn rocket() -> _ {
| ----------- this is not `async`
73 | let _ = rocket::build().launch().await;
| ^^^^^ only allowed inside `async` functions and blocks

View File

@ -65,7 +65,7 @@ error: unexpected attribute parameter: `message`
error[E0308]: arguments to this function are incorrect
--> tests/ui-fail-nightly/catch.rs:30:4
|
30 | fn f3(_request: &Request, other: bool) { }
30 | fn f3(_request: &Request, _other: bool) { }
| ^^ -------- ---- an argument of type `bool` is missing
| |
| unexpected argument of type `Status`
@ -73,8 +73,8 @@ error[E0308]: arguments to this function are incorrect
note: function defined here
--> tests/ui-fail-nightly/catch.rs:30:4
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^ ------------------ -----------
30 | fn f3(_request: &Request, _other: bool) { }
| ^^ ------------------ ------------
help: provide the argument
|
29 | f3(bool, /* bool */)

View File

@ -7,14 +7,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
@ -26,14 +26,14 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
| ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
error[E0308]: mismatched types
@ -59,14 +59,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
@ -78,12 +78,12 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others

View File

@ -521,7 +521,7 @@ error[E0277]: the trait bound `bool: From<&str>` is not satisfied
--> tests/ui-fail-nightly/from_form.rs:209:23
|
209 | #[field(default = "no conversion")]
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool`
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool`, which is required by `&str: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<bool as From<format_description::parse::format_item::HourBase>>

View File

@ -2,34 +2,210 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:7:12
|
7 | field: Unknown,
| ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`
| ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:5:10
|
5 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `_::FromFormGeneratedContext<'r>: std::marker::Send`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
note: required because it appears within the type `_::FromFormGeneratedContext<'r>`
--> tests/ui-fail-nightly/from_form_type_errors.rs:6:8
|
6 | struct BadType3 {
| ^^^^^^^^
note: required by a bound in `rocket::form::FromForm::Context`
--> $WORKSPACE/core/lib/src/form/from_form.rs
|
| type Context: Send;
| ^^^^ required by this bound in `FromForm::Context`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:14:12
|
14 | field: Foo<usize>,
| ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`
| ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:12:10
|
12 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `_::FromFormGeneratedContext<'r>: std::marker::Send`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
note: required because it appears within the type `_::FromFormGeneratedContext<'r>`
--> tests/ui-fail-nightly/from_form_type_errors.rs:13:8
|
13 | struct Other {
| ^^^^^
note: required by a bound in `rocket::form::FromForm::Context`
--> $WORKSPACE/core/lib/src/form/from_form.rs
|
| type Context: Send;
| ^^^^ required by this bound in `FromForm::Context`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:5:10
|
5 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:7:5
|
7 | field: Unknown,
| ^^^^^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
error[E0277]: the trait bound `Unknown: FromFormField<'r>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:7:12
|
7 | field: Unknown,
| ^^^^^^^ the trait `FromFormField<'r>` is not implemented for `Unknown`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
note: required by a bound in `FromFieldContext`
--> $WORKSPACE/core/lib/src/form/from_form_field.rs
|
| pub struct FromFieldContext<'v, T: FromFormField<'v>> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `FromFieldContext`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:12:10
|
12 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:14:5
|
14 | field: Foo<usize>,
| ^^^^^^^^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'r>` is not satisfied
--> tests/ui-fail-nightly/from_form_type_errors.rs:14:12
|
14 | field: Foo<usize>,
| ^^^^^^^^^^ the trait `FromFormField<'r>` is not implemented for `Foo<usize>`
|
= help: the following other types implement trait `FromFormField<'v>`:
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
note: required by a bound in `FromFieldContext`
--> $WORKSPACE/core/lib/src/form/from_form_field.rs
|
| pub struct FromFieldContext<'v, T: FromFormField<'v>> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `FromFieldContext`

View File

@ -5,34 +5,34 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
| ^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<Thing1 as Responder<'r, 'o>>
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> tests/ui-fail-nightly/responder-types.rs:11:5
|
11 | other: u8,
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`, which is required by `u8: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Frame>>
<Header<'static> as From<&Hsts>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Permission>>
<Header<'static> as From<&Prefetch>>
<Header<'static> as From<&Referrer>>
and $N others
= note: required for `u8` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
@ -45,34 +45,34 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
| ^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<Thing1 as Responder<'r, 'o>>
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> tests/ui-fail-nightly/responder-types.rs:17:5
|
17 | other: u8,
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`, which is required by `u8: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Frame>>
<Header<'static> as From<&Hsts>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Permission>>
<Header<'static> as From<&Prefetch>>
<Header<'static> as From<&Referrer>>
and $N others
= note: required for `u8` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
@ -82,20 +82,20 @@ error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not sat
--> tests/ui-fail-nightly/responder-types.rs:24:5
|
24 | then: String,
| ^^^^^^^^^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`
| ^^^^^^^^^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`, which is required by `std::string::String: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Frame>>
<Header<'static> as From<&Hsts>>
<Header<'static> as From<&NoSniff>>
<Header<'static> as From<&Permission>>
<Header<'static> as From<&Prefetch>>
<Header<'static> as From<&Referrer>>
and $N others
= note: required for `std::string::String` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
@ -110,16 +110,16 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<Thing1 as Responder<'r, 'o>>
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<&'o [u8] as Responder<'r, 'o>>
<&'o str as Responder<'r, 'o>>
<() as Responder<'r, 'static>>
<(ContentType, R) as Responder<'r, 'o>>
<(Status, R) as Responder<'r, 'o>>
<Accepted<R> as Responder<'r, 'o>>
<Arc<[u8]> as Responder<'r, 'static>>
<Arc<str> as Responder<'r, 'static>>
and $N others
note: required by a bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, (rocket::Data<'o>, Status)>>::from`
note: required by a bound in `route::handler::<impl Outcome<Response<'o>, Status, (rocket::Data<'o>, Status)>>::from`
--> $WORKSPACE/core/lib/src/route/handler.rs
|
| pub fn from<R: Responder<'r, 'o>>(req: &'r Request<'_>, responder: R) -> Outcome<'r> {

View File

@ -172,42 +172,38 @@ error: invalid or unknown media type
90 | #[get("/", format = "text//foo")]
| ^^^^^^^^^^^
error: invalid HTTP method for route handlers
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:95:9
error: expected key/value `key = value`
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:95:18
|
95 | #[route(CONNECT, "/")]
| ^^^^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
| ^^^
error: invalid HTTP method
error: invalid or unknown HTTP method
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:98:9
|
98 | #[route(FIX, "/")]
| ^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
error: expected identifier, found string literal
error: invalid or unknown HTTP method
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:101:9
|
101 | #[route("hi", "/")]
| ^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
error: expected identifier, found string literal
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:104:9
error: expected key/value `key = value`
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:104:16
|
104 | #[route("GET", "/")]
| ^^^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
| ^^^
error: expected identifier, found integer literal
error: expected method ident or string, found integer literal
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:107:9
|
107 | #[route(120, "/")]
| ^^^
|
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL

View File

@ -185,6 +185,7 @@ warning: `segment` starts with `<` but does not end with `>`
| ^^^^
|
= help: perhaps you meant the dynamic parameter `<foo>`?
= note: apply `#[suppress(segment_chars)]` before the item to suppress this lint
error: unexpected static parameter
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:80:20
@ -224,6 +225,7 @@ warning: `segment` starts with `<` but does not end with `>`
| ^^^^^
|
= help: perhaps you meant the dynamic parameter `<id>`?
= note: apply `#[suppress(segment_chars)]` before the item to suppress this lint
warning: `segment` starts with `<` but does not end with `>`
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:99:9
@ -232,6 +234,7 @@ warning: `segment` starts with `<` but does not end with `>`
| ^^^^^^^^
|
= help: perhaps you meant the dynamic parameter `<id>`?
= note: apply `#[suppress(segment_chars)]` before the item to suppress this lint
warning: `segment` starts with `<` but does not end with `>`
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:102:9
@ -240,3 +243,4 @@ warning: `segment` starts with `<` but does not end with `>`
| ^^^^^^^^
|
= help: perhaps you meant the dynamic parameter `<name>`?
= note: apply `#[suppress(segment_chars)]` before the item to suppress this lint

View File

@ -1,166 +1,166 @@
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:6:12
--> tests/ui-fail-nightly/route-type-errors.rs:6:13
|
6 | fn f0(foo: Q) {}
6 | fn f0(_foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'a str
IpAddr
Ipv4Addr
Ipv6Addr
NonZero<i128>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and $N others
error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:9:12
--> tests/ui-fail-nightly/route-type-errors.rs:9:13
|
9 | fn f1(foo: Q) {}
9 | fn f1(_foo: Q) {}
| ^ the trait `FromSegments<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromSegments<'r>`:
<Segments<'r, rocket::http::uri::fmt::Path> as FromSegments<'r>>
<PathBuf as FromSegments<'_>>
<std::option::Option<T> as FromSegments<'r>>
<Result<T, <T as FromSegments<'r>>::Error> as FromSegments<'r>>
<Segments<'r, rocket::http::uri::fmt::Path> as FromSegments<'r>>
<std::option::Option<T> as FromSegments<'r>>
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:12:12
--> tests/ui-fail-nightly/route-type-errors.rs:12:13
|
12 | fn f2(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
12 | fn f2(_foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`, which is required by `Q: FromForm<'_>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Q` to implement `FromForm<'_>`
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:15:12
--> tests/ui-fail-nightly/route-type-errors.rs:15:13
|
15 | fn f3(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
15 | fn f3(_foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`, which is required by `Q: FromForm<'_>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'v [u8]
&'v str
Capped<&'v [u8]>
Capped<&'v str>
Capped<Cow<'v, str>>
Capped<TempFile<'v>>
Capped<std::string::String>
Cow<'v, str>
and $N others
= note: required for `Q` to implement `FromForm<'_>`
error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:18:12
--> tests/ui-fail-nightly/route-type-errors.rs:18:13
|
18 | fn f4(foo: Q) {}
18 | fn f4(_foo: Q) {}
| ^ the trait `FromData<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromData<'r>`:
rocket::Data<'r>
Cow<'_, str>
Capped<Cow<'_, str>>
Capped<Vec<u8>>
Capped<TempFile<'_>>
Capped<std::string::String>
Capped<&'r str>
&'r RawStr
&'r [u8]
&'r str
Capped<&'r RawStr>
Capped<&'r [u8]>
Capped<&'r str>
Capped<Cow<'_, str>>
Capped<TempFile<'_>>
and $N others
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:21:10
--> tests/ui-fail-nightly/route-type-errors.rs:21:11
|
21 | fn f5(a: Q, foo: Q) {}
21 | fn f5(_a: Q, _foo: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromRequest<'r>`:
rocket::http::Method
Outcome<T, (Status, <T as FromRequest<'r>>::Error), Status>
Flash<&'r rocket::http::CookieJar<'r>>
rocket::Shutdown
IpAddr
std::net::SocketAddr
std::option::Option<T>
Result<T, <T as FromRequest<'r>>::Error>
&'r Accept
&'r ContentType
&'r CookieJar<'r>
&'r Endpoint
&'r Host<'r>
&'r Limits
&'r Route
&'r rocket::Config
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:21:18
--> tests/ui-fail-nightly/route-type-errors.rs:21:20
|
21 | fn f5(a: Q, foo: Q) {}
21 | fn f5(_a: Q, _foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'a str
IpAddr
Ipv4Addr
Ipv6Addr
NonZero<i128>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and $N others
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:24:10
--> tests/ui-fail-nightly/route-type-errors.rs:24:11
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromRequest<'r>`:
rocket::http::Method
Outcome<T, (Status, <T as FromRequest<'r>>::Error), Status>
Flash<&'r rocket::http::CookieJar<'r>>
rocket::Shutdown
&'r Accept
&'r ContentType
&'r CookieJar<'r>
&'r Endpoint
&'r Host<'r>
&'r Limits
&'r Route
&'r rocket::Config
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:24:20
|
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
&'a str
IpAddr
std::net::SocketAddr
std::option::Option<T>
Result<T, <T as FromRequest<'r>>::Error>
Ipv4Addr
Ipv6Addr
NonZero<i128>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:24:18
--> tests/ui-fail-nightly/route-type-errors.rs:24:43
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-nightly/route-type-errors.rs:24:39
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
bool
isize
i8
i16
i32
i64
i128
usize
&'a str
IpAddr
Ipv4Addr
Ipv6Addr
NonZero<i128>
NonZero<i16>
NonZero<i32>
NonZero<i64>
and $N others

View File

@ -1,49 +1,47 @@
warning: 'application/x-custom' is not a known media type
warning: 'application/x-custom' is not a known format or media type
--> tests/ui-fail-nightly/route-warnings.rs:7:21
|
7 | #[get("/", format = "application/x-custom")]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: apply `#[suppress(unknown_format)]` before the item to suppress this lint
warning: 'x-custom/plain' is not a known media type
warning: 'x-custom/plain' is not a known format or media type
--> tests/ui-fail-nightly/route-warnings.rs:10:21
|
10 | #[get("/", format = "x-custom/plain")]
| ^^^^^^^^^^^^^^^^
|
= note: apply `#[suppress(unknown_format)]` before the item to suppress this lint
warning: 'x-custom/x-custom' is not a known media type
warning: 'x-custom/x-custom' is not a known format or media type
--> tests/ui-fail-nightly/route-warnings.rs:13:21
|
13 | #[get("/", format = "x-custom/x-custom")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: apply `#[suppress(unknown_format)]` before the item to suppress this lint
warning: `data` used with non-payload-supporting method
--> tests/ui-fail-nightly/route-warnings.rs:18:12
--> tests/ui-fail-nightly/route-warnings.rs:22:12
|
18 | #[get("/", data = "<_foo>")]
22 | #[get("/", data = "<_foo>")]
| ^^^^^^^^^^^^^^^
|
note: 'GET' does not typically support payloads
--> tests/ui-fail-nightly/route-warnings.rs:18:3
|
18 | #[get("/", data = "<_foo>")]
| ^^^
= note: this warning originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: 'GET' does not typically support payloads
= note: apply `#[suppress(dubious_payload)]` before the item to suppress this lint
warning: `data` used with non-payload-supporting method
--> tests/ui-fail-nightly/route-warnings.rs:21:13
--> tests/ui-fail-nightly/route-warnings.rs:25:13
|
21 | #[head("/", data = "<_foo>")]
25 | #[head("/", data = "<_foo>")]
| ^^^^^^^^^^^^^^^
|
note: 'HEAD' does not typically support payloads
--> tests/ui-fail-nightly/route-warnings.rs:21:3
|
21 | #[head("/", data = "<_foo>")]
| ^^^^
= note: this warning originates in the attribute macro `head` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: 'HEAD' does not typically support payloads
= note: apply `#[suppress(dubious_payload)]` before the item to suppress this lint
error: checking for warnings!
--> tests/ui-fail-nightly/route-warnings.rs:25:5
--> tests/ui-fail-nightly/route-warnings.rs:33:5
|
25 | compile_error!("checking for warnings!")
33 | compile_error!("checking for warnings!")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,208 +1,245 @@
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `Empty`, found `&str`
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `Empty`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:45:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
45 | uri!(simple(id = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
47 | uri!(simple(id = "hi"));
| ----------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
47 | uri!(simple("hello"));
| ^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
49 | uri!(simple("hello"));
| --------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
49 | uri!(simple(id = 239239i64));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
...
51 | uri!(simple(id = 239239i64));
| ---------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:18:35
|
51 | uri!(not_uri_display(10, S));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
18 | fn not_uri_display(id: i32, name: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
...
53 | uri!(not_uri_display(10, S));
| ---------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_not_uri_display` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:30
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:53:30
|
51 | uri!(not_uri_display(10, S));
53 | uri!(not_uri_display(10, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:18
|
56 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`, which is required by `std::option::Option<i32>: FromUriParam<rocket::http::uri::fmt::Path, _>`
...
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ------------------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<i32 as FromUriParam<P, i32>>
<i32 as FromUriParam<P, &'x i32>>
<i32 as FromUriParam<P, &'x mut i32>>
<i32 as FromUriParam<P, i32>>
= note: required for `std::option::Option<i32>` to implement `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
= note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:24:37
|
56 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not implemented for `std::string::String`
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not implemented for `std::string::String`, which is required by `Result<std::string::String, &str>: FromUriParam<rocket::http::uri::fmt::Path, _>`
...
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ------------------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<std::string::String as FromUriParam<P, std::string::String>>
<std::string::String as FromUriParam<P, &'x std::string::String>>
<std::string::String as FromUriParam<P, &'x mut std::string::String>>
<std::string::String as FromUriParam<P, &'a str>>
<std::string::String as FromUriParam<P, &'x &'a str>>
<std::string::String as FromUriParam<P, &'x mut &'a str>>
<std::string::String as FromUriParam<P, &'x mut std::string::String>>
<std::string::String as FromUriParam<P, &'x std::string::String>>
<std::string::String as FromUriParam<P, std::string::String>>
= note: required for `Result<std::string::String, &str>` to implement `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>`
= note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:38:17
|
58 | uri!(simple_q("hi"));
| ^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
38 | fn simple_q(id: isize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
...
60 | uri!(simple_q("hi"));
| -------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:38:17
|
60 | uri!(simple_q(id = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
38 | fn simple_q(id: isize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
...
62 | uri!(simple_q(id = "hi"));
| ------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29
|
62 | uri!(other_q(100, S));
| ^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
64 | uri!(other_q(100, S));
| --------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:23
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:23
|
62 | uri!(other_q(100, S));
64 | uri!(other_q(100, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29
|
64 | uri!(other_q(rest = S, id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:25
|
64 | uri!(other_q(rest = S, id = 100));
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
66 | uri!(other_q(rest = S, id = 100));
| --------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25
|
66 | uri!(other_q(rest = _, id = 100));
66 | uri!(other_q(rest = S, id = 100));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25
|
68 | uri!(other_q(rest = _, id = 100));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `S`
|
= help: the following other types implement trait `Ignorable<P>`:
std::option::Option<T>
Result<T, E>
std::option::Option<T>
note: required by a bound in `assert_ignorable`
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
@ -210,14 +247,14 @@ note: required by a bound in `assert_ignorable`
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `usize: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:33
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:70:33
|
68 | uri!(other_q(rest = S, id = _));
70 | uri!(other_q(rest = S, id = _));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `usize`
|
= help: the following other types implement trait `Ignorable<P>`:
std::option::Option<T>
Result<T, E>
std::option::Option<T>
note: required by a bound in `assert_ignorable`
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
@ -225,62 +262,71 @@ note: required by a bound in `assert_ignorable`
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:41:29
|
68 | uri!(other_q(rest = S, id = _));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
70 | uri!(other_q(rest = S, id = _));
| ------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:70:25
|
68 | uri!(other_q(rest = S, id = _));
70 | uri!(other_q(rest = S, id = _));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x &'a [u8]>>
<&'a [u8] as FromUriParam<rocket::http::uri::fmt::Query, &'x mut &'a [u8]>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x PathBuf>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut &'a std::path::Path>>
<&'a std::path::Path as FromUriParam<rocket::http::uri::fmt::Path, &'x mut PathBuf>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ----------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:15
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:79:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRoutePrefix`:
rocket::http::uri::Origin<'a>
rocket::http::uri::Absolute<'a>
rocket::http::uri::Origin<'a>
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
@ -288,28 +334,32 @@ note: required by a bound in `RouteUriBuilder::with_prefix`
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
80 | uri!(uri!("*"), simple(id = "hi"));
| ---------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:15
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:80:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
80 | uri!(uri!("*"), simple(id = "hi"));
| -----^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRoutePrefix`:
rocket::http::uri::Origin<'a>
rocket::http::uri::Absolute<'a>
rocket::http::uri::Origin<'a>
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
@ -317,30 +367,34 @@ note: required by a bound in `RouteUriBuilder::with_prefix`
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
83 | uri!(_, simple(id = "hi"), uri!("*"));
| ------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:83:37
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
83 | uri!(_, simple(id = "hi"), uri!("*"));
| -----^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRouteSuffix<T>`:
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
@ -350,30 +404,34 @@ note: required by a bound in `RouteUriBuilder::with_suffix`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:5
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:15:15
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| -------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:37
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:84:37
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Origin<'_>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRouteSuffix<T>`:
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Absolute<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Absolute<'a>>>
<rocket::http::uri::Reference<'a> as ValidRouteSuffix<rocket::http::uri::Origin<'a>>>
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
@ -383,112 +441,122 @@ note: required by a bound in `RouteUriBuilder::with_suffix`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:45:22
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:22
|
45 | uri!(simple(id = "hi"));
47 | uri!(simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:17
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:17
|
47 | uri!(simple("hello"));
49 | uri!(simple("hello"));
| ^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:22
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:22
|
49 | uri!(simple(id = 239239i64));
51 | uri!(simple(id = 239239i64));
| ^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:25
|
56 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`, which is required by `std::option::Option<i32>: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<i32 as FromUriParam<P, i32>>
<i32 as FromUriParam<P, &'x i32>>
<i32 as FromUriParam<P, &'x mut i32>>
<i32 as FromUriParam<P, i32>>
= note: required for `std::option::Option<i32>` to implement `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:19
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:19
|
58 | uri!(simple_q("hi"));
60 | uri!(simple_q("hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:24
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:24
|
60 | uri!(simple_q(id = "hi"));
62 | uri!(simple_q(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:40
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:79:40
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:33
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:80:33
|
78 | uri!(uri!("*"), simple(id = "hi"));
80 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:83:25
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
83 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:84:25
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,294 +1,288 @@
error: expected identifier, found keyword `_`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:63:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:65:18
|
63 | uri!(ignored(_ = 10));
65 | uri!(ignored(_ = 10));
| ^
error: route expects 1 parameter but 2 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:69:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:71:18
|
69 | uri!(ignored(10, "10"));
71 | uri!(ignored(10, "10"));
| ^^^^^^^^
|
= note: route `ignored` has uri "/<_>"
error: expected unnamed arguments due to ignored parameters
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:67:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:69:18
|
67 | uri!(ignored(num = 10));
69 | uri!(ignored(num = 10));
| ^^^^^^^^
|
= note: uri for route `ignored` ignores path parameters: "/<_>"
= note: uri for route `ignored` ignores 1 path parameters: "/<_>"
error: route expects 1 parameter but 2 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:65:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:67:18
|
65 | uri!(ignored(10, 20));
67 | uri!(ignored(10, 20));
| ^^^^^^
|
= note: route `ignored` has uri "/<_>"
error: path parameters cannot be ignored
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:61:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:63:18
|
61 | uri!(ignored(_));
63 | uri!(ignored(_));
| ^
error: path parameters cannot be ignored
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:59:36
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:61:36
|
59 | uri!(optionals(id = 10, name = _));
61 | uri!(optionals(id = 10, name = _));
| ^
error: path parameters cannot be ignored
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:57:25
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:59:25
|
57 | uri!(optionals(id = _, name = "bob".into()));
59 | uri!(optionals(id = _, name = "bob".into()));
| ^
error: invalid parameters for `has_two` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:57:18
|
55 | uri!(has_two(id = 100, cookies = "hi"));
57 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: unknown parameter: `cookies`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:28
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:57:28
|
55 | uri!(has_two(id = 100, cookies = "hi"));
57 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_two` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:18
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: unknown parameter: `cookies`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:18
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^^^^^^
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:44
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:55:44
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^ ^^
error: invalid parameters for `has_two` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:51:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:53:18
|
51 | uri!(has_two(name = "hi"));
53 | uri!(has_two(name = "hi"));
| ^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `id`
error: invalid parameters for `has_two` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:51:18
|
49 | uri!(has_two(id = 100, id = 100, ));
51 | uri!(has_two(id = 100, id = 100, ));
| ^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:28
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:51:28
|
49 | uri!(has_two(id = 100, id = 100, ));
51 | uri!(has_two(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one_guarded` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:26
|
49 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `cookies`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:49:36
|
49 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:47:26
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
47 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `cookies`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:47:36
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:47:26
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:26
|
45 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `cookies`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:26
|
45 | uri!(has_one_guarded(cookies = "hi", id = 100));
47 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:43:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:18
|
43 | uri!(has_one(name = "hi"));
45 | uri!(has_one(name = "hi"));
| ^^^^^^^^^^^
|
= note: uri parameters are: id: i32
= help: missing parameter: `id`
help: unknown parameter: `name`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:45:18
|
45 | uri!(has_one(name = "hi"));
| ^^^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:43:18
|
43 | uri!(has_one(name = "hi"));
| ^^^^
43 | uri!(has_one(id = 100, id = 100, ));
| ^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:43:28
|
43 | uri!(has_one(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:41:18
|
41 | uri!(has_one(id = 100, id = 100, ));
| ^^^^^^^^^^^^^^^^^^^
41 | uri!(has_one(id = 100, id = 100));
| ^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:41:28
|
41 | uri!(has_one(id = 100, id = 100, ));
41 | uri!(has_one(id = 100, id = 100));
| ^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:18
|
39 | uri!(has_one(id = 100, id = 100));
| ^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:28
|
39 | uri!(has_one(id = 100, id = 100));
| ^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameters: `name`, `age`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^ ^^^
help: duplicate parameter: `id`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:50
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:39:50
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
37 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameters: `name`, `age`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:37:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
37 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^ ^^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18
|
33 | uri!(has_one(name = 100, id = 100));
35 | uri!(has_one(name = 100, id = 100));
| ^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `name`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:35:18
|
33 | uri!(has_one(name = 100, id = 100));
35 | uri!(has_one(name = 100, id = 100));
| ^^^^
error: invalid parameters for `has_one` route uri
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:31:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:18
|
31 | uri!(has_one(id = 100, name = "hi"));
33 | uri!(has_one(id = 100, name = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: uri parameters are: id: i32
help: unknown parameter: `name`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:31:28
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:33:28
|
31 | uri!(has_one(id = 100, name = "hi"));
33 | uri!(has_one(id = 100, name = "hi"));
| ^^^^
error: route expects 2 parameters but 1 was supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:29:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:31:18
|
29 | uri!(has_two(10));
31 | uri!(has_two(10));
| ^^
|
= note: route `has_two` has uri "/<id>?<name>"
error: route expects 2 parameters but 3 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:28:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:30:18
|
28 | uri!(has_two(10, "hi", "there"));
30 | uri!(has_two(10, "hi", "there"));
| ^^^^^^^^^^^^^^^^^
|
= note: route `has_two` has uri "/<id>?<name>"
error: route expects 1 parameter but 2 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:26:26
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:28:26
|
26 | uri!(has_one_guarded("hi", 100));
28 | uri!(has_one_guarded("hi", 100));
| ^^^^^^^^^
|
= note: route `has_one_guarded` has uri "/<id>"
error: route expects 1 parameter but 2 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:25:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:27:18
|
25 | uri!(has_one("Hello", 23, ));
27 | uri!(has_one("Hello", 23, ));
| ^^^^^^^^^^^^
|
= note: route `has_one` has uri "/<id>"
error: route expects 1 parameter but 2 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:24:18
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:26:18
|
24 | uri!(has_one(1, 23));
26 | uri!(has_one(1, 23));
| ^^^^^
|
= note: route `has_one` has uri "/<id>"
error: route expects 1 parameter but 0 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:22:10
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:24:10
|
22 | uri!(has_one());
24 | uri!(has_one());
| ^^^^^^^
|
= note: route `has_one` has uri "/<id>"
error: route expects 1 parameter but 0 were supplied
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:21:10
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:23:10
|
21 | uri!(has_one);
23 | uri!(has_one);
| ^^^^^^^
|
= note: route `has_one` has uri "/<id>"
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:15:37
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:17:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
17 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `Empty`, found `&str`
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:15:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `Empty`

View File

@ -150,4 +150,4 @@ error: route expects 2 parameters but 0 were supplied
13 | uri!(simple,);
| ^^^^^^
|
= note: route `simple` has uri "/<id>/<name>"
= note: route `simple` has uri "/<_id>/<_name>"

View File

@ -2,17 +2,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:6:13
|
6 | struct Bar1(BadType);
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
@ -25,17 +25,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:10:5
|
10 | field: BadType,
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
@ -48,17 +48,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:16:5
|
16 | bad: BadType,
| ^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
@ -71,17 +71,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:21:11
|
21 | Inner(BadType),
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
= note: 1 redundant requirement hidden
@ -96,17 +96,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:27:9
|
27 | field: BadType,
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
= note: 1 redundant requirement hidden
@ -121,17 +121,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-nightly/uri_display_type_errors.rs:35:9
|
35 | other: BadType,
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Query>`
= note: 1 redundant requirement hidden
@ -146,17 +146,17 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Path>
--> tests/ui-fail-nightly/uri_display_type_errors.rs:40:12
|
40 | struct Baz(BadType);
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Path>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Path>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Path>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
<isize as UriDisplay<P>>
<i8 as UriDisplay<P>>
<i16 as UriDisplay<P>>
<i32 as UriDisplay<P>>
<i64 as UriDisplay<P>>
<i128 as UriDisplay<P>>
<usize as UriDisplay<P>>
<&T as UriDisplay<P>>
<&mut T as UriDisplay<P>>
<BTreeMap<K, V> as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar1 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar2 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar3 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar4 as UriDisplay<rocket::http::uri::fmt::Query>>
<Bar5 as UriDisplay<rocket::http::uri::fmt::Query>>
and $N others
= note: required for `&BadType` to implement `UriDisplay<rocket::http::uri::fmt::Path>`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`

View File

@ -10,7 +10,7 @@ error: [note] this function must be `async`
--> tests/ui-fail-stable/async-entry.rs:5:5
|
5 | fn foo() { }
| ^^
| ^^^^^^^^
error: attribute can only be applied to `async` functions
--> tests/ui-fail-stable/async-entry.rs:16:5
@ -24,7 +24,7 @@ error: [note] this function must be `async`
--> tests/ui-fail-stable/async-entry.rs:17:5
|
17 | fn main() {
| ^^
| ^^^^^^^^^
error: attribute cannot be applied to `main` function
= note: this attribute generates a `main` function
@ -53,7 +53,7 @@ error: [note] this function must return a value
--> tests/ui-fail-stable/async-entry.rs:57:5
|
57 | async fn rocket() {
| ^^^^^
| ^^^^^^^^^^^^^^^^^
error: attribute can only be applied to functions that return a value
--> tests/ui-fail-stable/async-entry.rs:64:5
@ -67,7 +67,7 @@ error: [note] this function must return a value
--> tests/ui-fail-stable/async-entry.rs:65:5
|
65 | fn rocket() {
| ^^
| ^^^^^^^^^^^
error: attribute cannot be applied to `main` function
= note: this attribute generates a `main` function
@ -143,10 +143,9 @@ error[E0308]: mismatched types
--> tests/ui-fail-stable/async-entry.rs:24:21
|
24 | async fn main() {
| ^
| |
| _____________________expected `()` because of default return type
| |
| ____________________-^
| | |
| | expected `()` because of default return type
25 | | rocket::build()
26 | | }
| | ^- help: consider using a semicolon here: `;`

View File

@ -1,13 +1,13 @@
error: parameter must be named
= help: use a name such as `_guard` or `_param`
--> tests/ui-fail-stable/bad-ignored-segments.rs:6:7
--> tests/ui-fail-stable/bad-ignored-segments.rs:6:12
|
6 | #[get("/c?<_>")]
| ^^^^^^^^
| ^
error: parameter must be named
= help: use a name such as `_guard` or `_param`
--> tests/ui-fail-stable/bad-ignored-segments.rs:9:21
--> tests/ui-fail-stable/bad-ignored-segments.rs:9:22
|
9 | #[post("/d", data = "<_>")]
| ^^^^^
| ^^^

View File

@ -24,14 +24,14 @@ error: unexpected keyed parameter: expected literal or identifier
--> tests/ui-fail-stable/catch.rs:14:9
|
14 | #[catch(code = "404")]
| ^^^^
| ^^^^^^^^^^^^
error: unexpected keyed parameter: expected literal or identifier
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
--> tests/ui-fail-stable/catch.rs:17:9
|
17 | #[catch(code = 404)]
| ^^^^
| ^^^^^^^^^^
error: status must be in range [100, 599]
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
@ -52,21 +52,21 @@ error: unexpected attribute parameter: `message`
--> tests/ui-fail-stable/catch.rs:26:14
|
26 | #[catch(400, message = "foo")]
| ^^^^^^^
| ^^^^^^^^^^^^^^^
error[E0308]: arguments to this function are incorrect
--> tests/ui-fail-stable/catch.rs:30:4
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^ - ---- an argument of type `bool` is missing
30 | fn f3(_request: &Request, _other: bool) { }
| ^^ -------- ---- an argument of type `bool` is missing
| |
| unexpected argument of type `Status`
|
note: function defined here
--> tests/ui-fail-stable/catch.rs:30:4
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^ ------------------ -----------
30 | fn f3(_request: &Request, _other: bool) { }
| ^^ ------------------ ------------
help: provide the argument
|
29 | f3(bool, /* bool */)

View File

@ -7,14 +7,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<rocket::serde::json::Value as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
@ -26,14 +26,14 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
| ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<rocket::serde::json::Value as Responder<'r, 'static>>
and $N others
error[E0308]: mismatched types
@ -59,14 +59,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<rocket::serde::json::Value as Responder<'r, 'static>>
and $N others
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
@ -78,12 +78,12 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Cow<'o, R> as Responder<'r, 'o>>
<rocket::tokio::fs::File as Responder<'r, 'static>>
<EventStream<S> as Responder<'r, 'r>>
<std::fs::File as Responder<'r, 'static>>
<rocket::serde::json::Value as Responder<'r, 'static>>
and $N others

View File

@ -2,7 +2,7 @@ error: enums are not supported
--> tests/ui-fail-stable/from_form.rs:4:1
|
4 | enum Thing { }
| ^^^^
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:3:10
@ -16,7 +16,7 @@ error: at least one field is required
--> tests/ui-fail-stable/from_form.rs:7:1
|
7 | struct Foo1;
| ^^^^^^
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:6:10
@ -93,13 +93,14 @@ error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:36:5
|
36 | foo: usize,
| ^^^
| ^^^^^^^^^^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:34:5
|
34 | #[field(name = "foo")]
| ^
34 | / #[field(name = "foo")]
35 | | field: String,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:32:10
@ -118,14 +119,16 @@ error: field name conflicts with previous name
error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:43:5
|
43 | #[field(name = "hello")]
| ^
43 | / #[field(name = "hello")]
44 | | other: String,
| |_________________^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:41:5
|
41 | #[field(name = "hello")]
| ^
41 | / #[field(name = "hello")]
42 | | first: String,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:39:10
@ -144,14 +147,15 @@ error: field name conflicts with previous name
error: [help] declared in this field
--> tests/ui-fail-stable/from_form.rs:50:5
|
50 | #[field(name = "first")]
| ^
50 | / #[field(name = "first")]
51 | | other: String,
| |_________________^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form.rs:49:5
|
49 | first: String,
| ^^^^^
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:47:10
@ -165,7 +169,7 @@ error: unexpected attribute parameter: `field`
--> tests/ui-fail-stable/from_form.rs:56:28
|
56 | #[field(name = "blah", field = "bloo")]
| ^^^^^
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:54:10
@ -221,7 +225,7 @@ error: unexpected attribute parameter: `beep`
--> tests/ui-fail-stable/from_form.rs:80:13
|
80 | #[field(beep = "bop")]
| ^^^^
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:78:10
@ -234,8 +238,10 @@ error: [note] error occurred while deriving `FromForm`
error: field has conflicting names
--> tests/ui-fail-stable/from_form.rs:86:5
|
86 | #[field(name = "blah")]
| ^
86 | / #[field(name = "blah")]
87 | | #[field(name = "blah")]
88 | | my_field: String,
| |____________________^
error: [note] this field name...
--> tests/ui-fail-stable/from_form.rs:86:20
@ -393,7 +399,7 @@ error: duplicate attribute parameter: default
--> tests/ui-fail-stable/from_form.rs:177:26
|
177 | #[field(default = 1, default = 2)]
| ^^^^^^^
| ^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form.rs:175:10
@ -553,7 +559,7 @@ error[E0277]: the trait bound `bool: From<&str>` is not satisfied
--> tests/ui-fail-stable/from_form.rs:209:23
|
209 | #[field(default = "no conversion")]
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool`
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool`, which is required by `&str: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<bool as From<format_description::parse::format_item::HourBase>>

View File

@ -2,7 +2,7 @@ error: tuple structs are not supported
--> tests/ui-fail-stable/from_form_field.rs:4:1
|
4 | struct Foo1;
| ^^^^^^
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `FromFormField`
--> tests/ui-fail-stable/from_form_field.rs:3:10
@ -16,7 +16,7 @@ error: tuple structs are not supported
--> tests/ui-fail-stable/from_form_field.rs:7:1
|
7 | struct Foo2(usize);
| ^^^^^^
| ^^^^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromFormField`
--> tests/ui-fail-stable/from_form_field.rs:6:10
@ -29,8 +29,10 @@ error: [note] error occurred while deriving `FromFormField`
error: named structs are not supported
--> tests/ui-fail-stable/from_form_field.rs:10:1
|
10 | struct Foo3 {
| ^^^^^^
10 | / struct Foo3 {
11 | | foo: usize,
12 | | }
| |_^
error: [note] error occurred while deriving `FromFormField`
--> tests/ui-fail-stable/from_form_field.rs:9:10
@ -58,7 +60,7 @@ error: enum must have at least one variant
--> tests/ui-fail-stable/from_form_field.rs:20:1
|
20 | enum Foo5 { }
| ^^^^
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromFormField`
--> tests/ui-fail-stable/from_form_field.rs:19:10
@ -113,8 +115,10 @@ error: [note] error occurred while deriving `FromFormField`
error: variant has conflicting values
--> tests/ui-fail-stable/from_form_field.rs:41:5
|
41 | #[field(value = "bar")]
| ^
41 | / #[field(value = "bar")]
42 | | #[field(value = "bar")]
43 | | A,
| |_____^
error: [note] this value...
--> tests/ui-fail-stable/from_form_field.rs:41:21
@ -145,14 +149,16 @@ error: field value conflicts with previous value
error: [help] ...declared in this variant
--> tests/ui-fail-stable/from_form_field.rs:50:5
|
50 | #[field(value = "BAr")]
| ^
50 | / #[field(value = "BAr")]
51 | | B,
| |_____^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form_field.rs:48:5
|
48 | #[field(value = "bar")]
| ^
48 | / #[field(value = "bar")]
49 | | A,
| |_____^
error: [note] error occurred while deriving `FromFormField`
--> tests/ui-fail-stable/from_form_field.rs:46:10
@ -171,8 +177,9 @@ error: field value conflicts with previous value
error: [help] ...declared in this variant
--> tests/ui-fail-stable/from_form_field.rs:57:5
|
57 | #[field(value = "a")]
| ^
57 | / #[field(value = "a")]
58 | | B,
| |_____^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form_field.rs:56:5
@ -191,8 +198,10 @@ error: [note] error occurred while deriving `FromFormField`
error: variant has conflicting values
--> tests/ui-fail-stable/from_form_field.rs:80:5
|
80 | #[field(value = "FoO")]
| ^
80 | / #[field(value = "FoO")]
81 | | #[field(value = "foo")]
82 | | A,
| |_____^
error: [note] this value...
--> tests/ui-fail-stable/from_form_field.rs:80:21
@ -217,8 +226,10 @@ error: [note] error occurred while deriving `FromFormField`
error: field has conflicting names
--> tests/ui-fail-stable/from_form_field.rs:87:5
|
87 | #[field(name = "foo")]
| ^
87 | / #[field(name = "foo")]
88 | | #[field(name = uncased("FOO"))]
89 | | single: usize,
| |_________________^
error: [note] this field name...
--> tests/ui-fail-stable/from_form_field.rs:87:20
@ -249,14 +260,16 @@ error: field name conflicts with previous name
error: [help] declared in this field
--> tests/ui-fail-stable/from_form_field.rs:96:5
|
96 | #[field(name = "foo")]
| ^
96 | / #[field(name = "foo")]
97 | | other: usize,
| |________________^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form_field.rs:94:5
|
94 | #[field(name = "foo")]
| ^
94 | / #[field(name = "foo")]
95 | | single: usize,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form_field.rs:92:10
@ -276,13 +289,14 @@ error: [help] declared in this field
--> tests/ui-fail-stable/from_form_field.rs:104:5
|
104 | hello_there: usize,
| ^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form_field.rs:102:5
|
102 | #[field(name = uncased("HELLO_THERE"))]
| ^
102 | / #[field(name = uncased("HELLO_THERE"))]
103 | | single: usize,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form_field.rs:100:10
@ -302,13 +316,14 @@ error: [help] declared in this field
--> tests/ui-fail-stable/from_form_field.rs:111:5
|
111 | hello_there: usize,
| ^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^
error: [note] previous field with conflicting name
--> tests/ui-fail-stable/from_form_field.rs:109:5
|
109 | #[field(name = "hello_there")]
| ^
109 | / #[field(name = "hello_there")]
110 | | single: usize,
| |_________________^
error: [note] error occurred while deriving `FromForm`
--> tests/ui-fail-stable/from_form_field.rs:107:10

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:7:12
|
7 | field: Unknown,
| ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`
| ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
@ -16,11 +16,40 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:5:10
|
5 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `_::FromFormGeneratedContext<'r>: std::marker::Send`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
note: required because it appears within the type `_::FromFormGeneratedContext<'r>`
--> tests/ui-fail-stable/from_form_type_errors.rs:6:8
|
6 | struct BadType3 {
| ^^^^^^^^
note: required by a bound in `rocket::form::FromForm::Context`
--> $WORKSPACE/core/lib/src/form/from_form.rs
|
| type Context: Send;
| ^^^^ required by this bound in `FromForm::Context`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:14:12
|
14 | field: Foo<usize>,
| ^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`
| ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
@ -33,3 +62,150 @@ error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
usize
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:12:10
|
12 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `_::FromFormGeneratedContext<'r>: std::marker::Send`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
note: required because it appears within the type `_::FromFormGeneratedContext<'r>`
--> tests/ui-fail-stable/from_form_type_errors.rs:13:8
|
13 | struct Other {
| ^^^^^
note: required by a bound in `rocket::form::FromForm::Context`
--> $WORKSPACE/core/lib/src/form/from_form.rs
|
| type Context: Send;
| ^^^^ required by this bound in `FromForm::Context`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:5:10
|
5 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:7:5
|
7 | field: Unknown,
| ^^^^^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`, which is required by `Unknown: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Unknown` to implement `FromForm<'r>`
error[E0277]: the trait bound `Unknown: FromFormField<'r>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:7:12
|
7 | field: Unknown,
| ^^^^^^^ the trait `FromFormField<'r>` is not implemented for `Unknown`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
note: required by a bound in `FromFieldContext`
--> $WORKSPACE/core/lib/src/form/from_form_field.rs
|
| pub struct FromFieldContext<'v, T: FromFormField<'v>> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `FromFieldContext`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:12:10
|
12 | #[derive(FromForm)]
| ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:14:5
|
14 | field: Foo<usize>,
| ^^^^^^^^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`, which is required by `Foo<usize>: FromForm<'r>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
= note: required for `Foo<usize>` to implement `FromForm<'r>`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'r>` is not satisfied
--> tests/ui-fail-stable/from_form_type_errors.rs:14:12
|
14 | field: Foo<usize>,
| ^^^^^^^^^^ the trait `FromFormField<'r>` is not implemented for `Foo<usize>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
isize
i8
i16
i32
i64
i128
usize
and $N others
note: required by a bound in `FromFieldContext`
--> $WORKSPACE/core/lib/src/form/from_form_field.rs
|
| pub struct FromFieldContext<'v, T: FromFormField<'v>> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `FromFieldContext`

View File

@ -1,30 +1,30 @@
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> tests/ui-fail-stable/responder-types.rs:5:5
--> tests/ui-fail-stable/responder-types.rs:5:12
|
5 | thing: u8,
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
| ^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<Thing1 as Responder<'r, 'o>>
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
and $N others
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> tests/ui-fail-stable/responder-types.rs:11:5
|
11 | other: u8,
| ^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`, which is required by `u8: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
@ -32,39 +32,39 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and $N others
= note: required for `u8` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
| ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header`
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> tests/ui-fail-stable/responder-types.rs:16:5
--> tests/ui-fail-stable/responder-types.rs:16:12
|
16 | thing: u8,
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
| ^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= help: the following other types implement trait `Responder<'r, 'o>`:
<Thing1 as Responder<'r, 'o>>
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
and $N others
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> tests/ui-fail-stable/responder-types.rs:17:5
|
17 | other: u8,
| ^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`, which is required by `u8: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
@ -72,7 +72,7 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and $N others
= note: required for `u8` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
@ -82,12 +82,12 @@ error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not sat
--> tests/ui-fail-stable/responder-types.rs:24:5
|
24 | then: String,
| ^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`
| ^^^^^^^^^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`, which is required by `std::string::String: Into<Header<'_>>`
|
= help: the following other types implement trait `From<T>`:
<Header<'static> as From<Cookie<'_>>>
<Header<'static> as From<ContentType>>
<Header<'static> as From<rocket::http::Accept>>
<Header<'static> as From<Accept>>
<Header<'static> as From<&Cookie<'_>>>
<Header<'static> as From<&Referrer>>
<Header<'static> as From<&ExpectCt>>
@ -95,7 +95,7 @@ error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not sat
<Header<'static> as From<&Hsts>>
and $N others
= note: required for `std::string::String` to implement `Into<Header<'_>>`
note: required by a bound in `rocket::Response::<'r>::set_header`
note: required by a bound in `Response::<'r>::set_header`
--> $WORKSPACE/core/lib/src/response/response.rs
|
| pub fn set_header<'h: 'r, H: Into<Header<'h>>>(&mut self, header: H) -> bool {
@ -114,12 +114,12 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
<Thing2 as Responder<'r, 'o>>
<Thing3 as Responder<'r, 'o>>
<Thing4 as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
<Box<str> as Responder<'r, 'static>>
<Box<[u8]> as Responder<'r, 'static>>
<Box<T> as Responder<'r, 'o>>
<rocket::Either<T, E> as Responder<'r, 'o>>
and $N others
note: required by a bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, (rocket::Data<'o>, Status)>>::from`
note: required by a bound in `route::handler::<impl Outcome<Response<'o>, Status, (rocket::Data<'o>, Status)>>::from`
--> $WORKSPACE/core/lib/src/route/handler.rs
|
| pub fn from<R: Responder<'r, 'o>>(req: &'r Request<'_>, responder: R) -> Outcome<'r> {

View File

@ -1,11 +1,11 @@
error: need at least one field
--> $DIR/responder.rs:4:1
--> tests/ui-fail-stable/responder.rs:4:1
|
4 | struct Thing1;
| ^^^^^^
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:3:10
--> tests/ui-fail-stable/responder.rs:3:10
|
3 | #[derive(Responder)]
| ^^^^^^^^^
@ -13,13 +13,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: need at least one field
--> $DIR/responder.rs:7:14
--> tests/ui-fail-stable/responder.rs:7:14
|
7 | struct Thing2();
| ^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:6:10
--> tests/ui-fail-stable/responder.rs:6:10
|
6 | #[derive(Responder)]
| ^^^^^^^^^
@ -27,13 +27,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: need at least one field
--> $DIR/responder.rs:13:12
--> tests/ui-fail-stable/responder.rs:13:12
|
13 | enum Foo { Bark, }
| ^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:12:10
--> tests/ui-fail-stable/responder.rs:12:10
|
12 | #[derive(Responder)]
| ^^^^^^^^^
@ -41,13 +41,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one lifetime is supported
--> $DIR/responder.rs:16:14
--> tests/ui-fail-stable/responder.rs:16:14
|
16 | struct Thing4<'a, 'b>(&'a str, &'b str);
| ^
| ^^^^^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:15:10
--> tests/ui-fail-stable/responder.rs:15:10
|
15 | #[derive(Responder)]
| ^^^^^^^^^
@ -55,13 +55,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid or unknown content type
--> $DIR/responder.rs:25:27
--> tests/ui-fail-stable/responder.rs:25:27
|
25 | #[response(content_type = "")]
| ^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:24:10
--> tests/ui-fail-stable/responder.rs:24:10
|
24 | #[derive(Responder)]
| ^^^^^^^^^
@ -69,13 +69,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid or unknown content type
--> $DIR/responder.rs:29:27
--> tests/ui-fail-stable/responder.rs:29:27
|
29 | #[response(content_type = "idk")]
| ^^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:28:10
--> tests/ui-fail-stable/responder.rs:28:10
|
28 | #[derive(Responder)]
| ^^^^^^^^^
@ -83,13 +83,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid value: expected string literal
--> $DIR/responder.rs:33:27
--> tests/ui-fail-stable/responder.rs:33:27
|
33 | #[response(content_type = 100)]
| ^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:32:10
--> tests/ui-fail-stable/responder.rs:32:10
|
32 | #[derive(Responder)]
| ^^^^^^^^^
@ -97,13 +97,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: status must be in range [100, 599]
--> $DIR/responder.rs:37:21
--> tests/ui-fail-stable/responder.rs:37:21
|
37 | #[response(status = 8)]
| ^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:36:10
--> tests/ui-fail-stable/responder.rs:36:10
|
36 | #[derive(Responder)]
| ^^^^^^^^^
@ -111,13 +111,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid value: expected unsigned integer literal
--> $DIR/responder.rs:41:21
--> tests/ui-fail-stable/responder.rs:41:21
|
41 | #[response(status = "404")]
| ^^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:40:10
--> tests/ui-fail-stable/responder.rs:40:10
|
40 | #[derive(Responder)]
| ^^^^^^^^^
@ -125,13 +125,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid value: expected unsigned integer literal
--> $DIR/responder.rs:45:21
--> tests/ui-fail-stable/responder.rs:45:21
|
45 | #[response(status = "404", content_type = "html")]
| ^^^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:44:10
--> tests/ui-fail-stable/responder.rs:44:10
|
44 | #[derive(Responder)]
| ^^^^^^^^^
@ -139,13 +139,13 @@ error: [note] error occurred while deriving `Responder`
= note: this error originates in the derive macro `Responder` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid value: expected string literal
--> $DIR/responder.rs:49:41
--> tests/ui-fail-stable/responder.rs:49:41
|
49 | #[response(status = 404, content_type = 120)]
| ^^^
error: [note] error occurred while deriving `Responder`
--> $DIR/responder.rs:48:10
--> tests/ui-fail-stable/responder.rs:48:10
|
48 | #[derive(Responder)]
| ^^^^^^^^^

View File

@ -50,26 +50,26 @@ error: unexpected keyed parameter: expected literal or identifier
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:27:7
|
27 | #[get(data = "<foo>", "/")]
| ^^^^
| ^^^^^^^^^^^^^^
error: unexpected attribute parameter: `unknown`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:30:12
|
30 | #[get("/", unknown = "foo")]
| ^^^^^^^
| ^^^^^^^^^^^^^^^
error: expected key/value `key = value`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:33:12
|
33 | #[get("/", ...)]
| ^
| ^^^
error: handler arguments must be named
= help: to name an ignored handler argument, use `_name`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:39:7
|
39 | fn c1(_: usize) {}
| ^
| ^^^^^^^^
error: invalid value: expected string literal
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:43:7
@ -167,36 +167,34 @@ error: invalid or unknown media type
90 | #[get("/", format = "text//foo")]
| ^^^^^^^^^^^
error: invalid HTTP method for route handlers
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:95:9
error: expected key/value `key = value`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:95:18
|
95 | #[route(CONNECT, "/")]
| ^^^^^^^
| ^^^
error: invalid HTTP method
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: invalid or unknown HTTP method
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:98:9
|
98 | #[route(FIX, "/")]
| ^^^
error: expected identifier, found string literal
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: invalid or unknown HTTP method
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:101:9
|
101 | #[route("hi", "/")]
| ^^^^
error: expected identifier, found string literal
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:9
error: expected key/value `key = value`
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:16
|
104 | #[route("GET", "/")]
| ^^^^^
| ^^^
error: expected identifier, found integer literal
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected method ident or string, found integer literal
= help: known methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, ACL, BASELINE-CONTROL, BIND, CHECKIN, CHECKOUT, COPY, LABEL, LINK, LOCK, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MKREDIRECTREF, MKWORKSPACE, MOVE, ORDERPATCH, PROPFIND, PROPPATCH, REBIND, REPORT, SEARCH, UNBIND, UNCHECKOUT, UNLINK, UNLOCK, UPDATE, UPDATEREDIRECTREF, VERSION-CONTROL
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:107:9
|
107 | #[route(120, "/")]

View File

@ -1,57 +1,57 @@
error: invalid route URI: expected token '/' but found 'a' at index 0
= help: expected URI in origin form: "/path/<param>"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:5:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:5:8
|
5 | #[get("a")]
| ^^^
| ^
error: invalid route URI: unexpected EOF: expected token '/' at index 0
= help: expected URI in origin form: "/path/<param>"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:8:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:8:8
|
8 | #[get("")]
| ^^
| ^
error: invalid route URI: expected token '/' but found 'a' at index 0
= help: expected URI in origin form: "/path/<param>"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:11:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:11:8
|
11 | #[get("a/b/c")]
| ^^^^^^^
| ^
error: route URIs cannot contain empty segments
= note: expected "/a/b", found "/a///b"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:14:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:14:10
|
14 | #[get("/a///b")]
| ^^^^^^^^
| ^^
error: route URIs cannot contain empty segments
= note: expected "/?bat", found "/?bat&&"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:17:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:17:13
|
17 | #[get("/?bat&&")]
| ^^^^^^^^^
| ^^
error: route URIs cannot contain empty segments
= note: expected "/?bat", found "/?bat&&"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:20:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:20:13
|
20 | #[get("/?bat&&")]
| ^^^^^^^^^
| ^^
error: route URIs cannot contain empty segments
= note: expected "/a/b/", found "/a/b//"
--> tests/ui-fail-stable/route-path-bad-syntax.rs:23:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:23:12
|
23 | #[get("/a/b//")]
| ^^^^^^^^
| ^^
error: unused parameter
--> tests/ui-fail-stable/route-path-bad-syntax.rs:42:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:42:10
|
42 | #[get("/<name>")]
| ^^^^^^^^^
| ^^^^
error: [note] expected argument named `name` here
--> tests/ui-fail-stable/route-path-bad-syntax.rs:43:6
@ -60,10 +60,10 @@ error: [note] expected argument named `name` here
| ^^^^^^^^^^^^^^
error: unused parameter
--> tests/ui-fail-stable/route-path-bad-syntax.rs:45:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:45:12
|
45 | #[get("/a?<r>")]
| ^^^^^^^^
| ^
error: [note] expected argument named `r` here
--> tests/ui-fail-stable/route-path-bad-syntax.rs:46:6
@ -72,10 +72,10 @@ error: [note] expected argument named `r` here
| ^^
error: unused parameter
--> tests/ui-fail-stable/route-path-bad-syntax.rs:48:21
--> tests/ui-fail-stable/route-path-bad-syntax.rs:48:23
|
48 | #[post("/a", data = "<test>")]
| ^^^^^^^^
| ^^^^
error: [note] expected argument named `test` here
--> tests/ui-fail-stable/route-path-bad-syntax.rs:49:6
@ -84,10 +84,10 @@ error: [note] expected argument named `test` here
| ^^
error: unused parameter
--> tests/ui-fail-stable/route-path-bad-syntax.rs:51:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:51:10
|
51 | #[get("/<_r>")]
| ^^^^^^^
| ^^
error: [note] expected argument named `_r` here
--> tests/ui-fail-stable/route-path-bad-syntax.rs:52:6
@ -96,10 +96,10 @@ error: [note] expected argument named `_r` here
| ^^
error: unused parameter
--> tests/ui-fail-stable/route-path-bad-syntax.rs:54:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:54:15
|
54 | #[get("/<_r>/<b>")]
| ^^^^^^^^^^^
| ^
error: [note] expected argument named `b` here
--> tests/ui-fail-stable/route-path-bad-syntax.rs:55:6
@ -110,73 +110,73 @@ error: [note] expected argument named `b` here
error: invalid identifier: `foo_.`
= help: dynamic parameters must be valid identifiers
= help: did you mean `<foo_>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:60:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:60:10
|
60 | #[get("/<foo_.>")]
| ^^^^^^^^^^
| ^^^^^
error: invalid identifier: `foo*`
= help: dynamic parameters must be valid identifiers
= help: did you mean `<foo>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:63:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:63:10
|
63 | #[get("/<foo*>")]
| ^^^^^^^^^
| ^^^^
error: invalid identifier: `!`
= help: dynamic parameters must be valid identifiers
= help: did you mean `<param>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:66:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:66:10
|
66 | #[get("/<!>")]
| ^^^^^^
| ^
error: invalid identifier: `name>:<id`
= help: dynamic parameters must be valid identifiers
= help: did you mean `<nameid>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:69:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:69:10
|
69 | #[get("/<name>:<id>")]
| ^^^^^^^^^^^^^^
error: unexpected static parameter
= help: parameter must be dynamic: `<foo>`
--> tests/ui-fail-stable/route-path-bad-syntax.rs:74:19
|
74 | #[get("/", data = "foo")]
| ^^^^^
error: parameter cannot be trailing
= help: did you mean `<foo>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:77:19
|
77 | #[get("/", data = "<foo..>")]
| ^^^^^^^^^
error: unexpected static parameter
= help: parameter must be dynamic: `<foo>`
--> tests/ui-fail-stable/route-path-bad-syntax.rs:80:19
--> tests/ui-fail-stable/route-path-bad-syntax.rs:74:20
|
74 | #[get("/", data = "foo")]
| ^^^
error: parameter cannot be trailing
= help: did you mean `<foo>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:77:20
|
77 | #[get("/", data = "<foo..>")]
| ^^^^^^^
error: unexpected static parameter
= help: parameter must be dynamic: `<foo>`
--> tests/ui-fail-stable/route-path-bad-syntax.rs:80:20
|
80 | #[get("/", data = "<foo")]
| ^^^^^^
| ^^^^
error: invalid identifier: `test `
= help: dynamic parameters must be valid identifiers
= help: did you mean `<test>`?
--> tests/ui-fail-stable/route-path-bad-syntax.rs:83:19
--> tests/ui-fail-stable/route-path-bad-syntax.rs:83:21
|
83 | #[get("/", data = "<test >")]
| ^^^^^^^^^
| ^^^^^
error: handler arguments must be named
= help: to name an ignored handler argument, use `_name`
--> tests/ui-fail-stable/route-path-bad-syntax.rs:89:7
|
89 | fn k0(_: usize) {}
| ^
| ^^^^^^^^
error: parameters cannot be empty
--> tests/ui-fail-stable/route-path-bad-syntax.rs:93:7
--> tests/ui-fail-stable/route-path-bad-syntax.rs:93:9
|
93 | #[get("/<>")]
| ^^^^^
| ^^

View File

@ -1,7 +1,7 @@
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:6:12
--> tests/ui-fail-stable/route-type-errors.rs:6:13
|
6 | fn f0(foo: Q) {}
6 | fn f0(_foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
@ -16,9 +16,9 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
and $N others
error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:9:12
--> tests/ui-fail-stable/route-type-errors.rs:9:13
|
9 | fn f1(foo: Q) {}
9 | fn f1(_foo: Q) {}
| ^ the trait `FromSegments<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromSegments<'r>`:
@ -28,10 +28,10 @@ error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
<Result<T, <T as FromSegments<'r>>::Error> as FromSegments<'r>>
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:12:12
--> tests/ui-fail-stable/route-type-errors.rs:12:13
|
12 | fn f2(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
12 | fn f2(_foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`, which is required by `Q: FromForm<'_>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
@ -46,10 +46,10 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required for `Q` to implement `FromForm<'_>`
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:15:12
--> tests/ui-fail-stable/route-type-errors.rs:15:13
|
15 | fn f3(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
15 | fn f3(_foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`, which is required by `Q: FromForm<'_>`
|
= help: the following other types implement trait `FromFormField<'v>`:
bool
@ -64,9 +64,9 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required for `Q` to implement `FromForm<'_>`
error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:18:12
--> tests/ui-fail-stable/route-type-errors.rs:18:13
|
18 | fn f4(foo: Q) {}
18 | fn f4(_foo: Q) {}
| ^ the trait `FromData<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromData<'r>`:
@ -74,33 +74,33 @@ error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied
Cow<'_, str>
Capped<Cow<'_, str>>
Capped<Vec<u8>>
Capped<TempFile<'_>>
Capped<std::string::String>
Capped<TempFile<'_>>
Capped<&'r str>
Capped<&'r RawStr>
and $N others
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:21:10
--> tests/ui-fail-stable/route-type-errors.rs:21:11
|
21 | fn f5(a: Q, foo: Q) {}
21 | fn f5(_a: Q, _foo: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromRequest<'r>`:
rocket::http::Method
ProxyProto<'r>
Method
Outcome<T, (Status, <T as FromRequest<'r>>::Error), Status>
Flash<&'r rocket::http::CookieJar<'r>>
Flash<&'r CookieJar<'r>>
rocket::Shutdown
IpAddr
std::net::SocketAddr
std::option::Option<T>
Result<T, <T as FromRequest<'r>>::Error>
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:21:18
--> tests/ui-fail-stable/route-type-errors.rs:21:20
|
21 | fn f5(a: Q, foo: Q) {}
21 | fn f5(_a: Q, _foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
@ -115,26 +115,26 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
and $N others
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:24:10
--> tests/ui-fail-stable/route-type-errors.rs:24:11
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromRequest<'r>`:
rocket::http::Method
ProxyProto<'r>
Method
Outcome<T, (Status, <T as FromRequest<'r>>::Error), Status>
Flash<&'r rocket::http::CookieJar<'r>>
Flash<&'r CookieJar<'r>>
rocket::Shutdown
IpAddr
std::net::SocketAddr
std::option::Option<T>
Result<T, <T as FromRequest<'r>>::Error>
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:24:18
--> tests/ui-fail-stable/route-type-errors.rs:24:20
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:
@ -149,9 +149,9 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
and $N others
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> tests/ui-fail-stable/route-type-errors.rs:24:39
--> tests/ui-fail-stable/route-type-errors.rs:24:43
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
24 | fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= help: the following other types implement trait `FromParam<'a>`:

View File

@ -1,5 +1,5 @@
error: checking for warnings!
--> $DIR/route-warnings.rs:25:5
--> tests/ui-fail-stable/route-warnings.rs:33:5
|
25 | compile_error!("checking for warnings!")
33 | compile_error!("checking for warnings!")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,52 +1,79 @@
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37
--> tests/ui-fail-stable/typed-uri-bad-type.rs:24:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected `Empty`, found `&str`
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected `&str`, found `Empty`
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `Empty`, found `&str`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:45:22
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
45 | uri!(simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
47 | uri!(simple(id = "hi"));
| ----------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:47:17
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
47 | uri!(simple("hello"));
| ^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
49 | uri!(simple("hello"));
| --------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:49:22
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
49 | uri!(simple(id = 239239i64));
| ^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
...
51 | uri!(simple(id = 239239i64));
| ---------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:51:30
--> tests/ui-fail-stable/typed-uri-bad-type.rs:18:35
|
51 | uri!(not_uri_display(10, S));
18 | fn not_uri_display(id: i32, name: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
...
53 | uri!(not_uri_display(10, S));
| ---------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_not_uri_display` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:53:30
|
53 | uri!(not_uri_display(10, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
@ -59,24 +86,32 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>`
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:56:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:24:18
|
56 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`, which is required by `std::option::Option<i32>: FromUriParam<rocket::http::uri::fmt::Path, _>`
...
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ------------------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<i32 as FromUriParam<P, i32>>
<i32 as FromUriParam<P, &'x i32>>
<i32 as FromUriParam<P, &'x mut i32>>
= note: required for `std::option::Option<i32>` to implement `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
= note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:56:42
--> tests/ui-fail-stable/typed-uri-bad-type.rs:24:37
|
56 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not implemented for `std::string::String`
24 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not implemented for `std::string::String`, which is required by `Result<std::string::String, &str>: FromUriParam<rocket::http::uri::fmt::Path, _>`
...
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ------------------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<std::string::String as FromUriParam<P, std::string::String>>
@ -86,33 +121,63 @@ error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::u
<std::string::String as FromUriParam<P, &'x &'a str>>
<std::string::String as FromUriParam<P, &'x mut &'a str>>
= note: required for `Result<std::string::String, &str>` to implement `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>`
= note: this error originates in the macro `rocket_uri_macro_optionals` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:58:19
--> tests/ui-fail-stable/typed-uri-bad-type.rs:38:17
|
58 | uri!(simple_q("hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
38 | fn simple_q(id: isize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
...
60 | uri!(simple_q("hi"));
| -------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
= note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:60:24
--> tests/ui-fail-stable/typed-uri-bad-type.rs:38:17
|
60 | uri!(simple_q(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
38 | fn simple_q(id: isize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
...
62 | uri!(simple_q(id = "hi"));
| ------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
= note: this error originates in the macro `rocket_uri_macro_simple_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:62:23
--> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29
|
62 | uri!(other_q(100, S));
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
64 | uri!(other_q(100, S));
| --------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:64:23
|
64 | uri!(other_q(100, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
@ -125,12 +190,16 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:64:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29
|
64 | uri!(other_q(rest = S, id = 100));
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
66 | uri!(other_q(rest = S, id = 100));
| --------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
@ -142,11 +211,30 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:66:25
|
66 | uri!(other_q(rest = _, id = 100));
66 | uri!(other_q(rest = S, id = 100));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:68:25
|
68 | uri!(other_q(rest = _, id = 100));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `S`
|
= help: the following other types implement trait `Ignorable<P>`:
@ -159,9 +247,9 @@ note: required by a bound in `assert_ignorable`
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `usize: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:68:33
--> tests/ui-fail-stable/typed-uri-bad-type.rs:70:33
|
68 | uri!(other_q(rest = S, id = _));
70 | uri!(other_q(rest = S, id = _));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `usize`
|
= help: the following other types implement trait `Ignorable<P>`:
@ -174,9 +262,30 @@ note: required by a bound in `assert_ignorable`
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:68:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:41:29
|
68 | uri!(other_q(rest = S, id = _));
41 | fn other_q(id: usize, rest: S) { }
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
...
70 | uri!(other_q(rest = S, id = _));
| ------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<bool as FromUriParam<P, bool>>
<bool as FromUriParam<P, &'x bool>>
<bool as FromUriParam<P, &'x mut bool>>
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket_uri_macro_other_q` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:70:25
|
70 | uri!(other_q(rest = S, id = _));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
@ -189,24 +298,30 @@ error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>
<i8 as FromUriParam<P, i8>>
<i8 as FromUriParam<P, &'x i8>>
and $N others
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:77:40
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ----------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:77:15
--> tests/ui-fail-stable/typed-uri-bad-type.rs:79:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| --- ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| |
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRoutePrefix`:
@ -219,22 +334,27 @@ note: required by a bound in `RouteUriBuilder::with_prefix`
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:78:33
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
80 | uri!(uri!("*"), simple(id = "hi"));
| ---------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:78:15
--> tests/ui-fail-stable/typed-uri-bad-type.rs:80:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
| --- ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| |
80 | uri!(uri!("*"), simple(id = "hi"));
| -----^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRoutePrefix`:
@ -247,22 +367,27 @@ note: required by a bound in `RouteUriBuilder::with_prefix`
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:81:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
83 | uri!(_, simple(id = "hi"), uri!("*"));
| ------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:81:37
--> tests/ui-fail-stable/typed-uri-bad-type.rs:83:37
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| --- ^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| |
83 | uri!(_, simple(id = "hi"), uri!("*"));
| -----^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRouteSuffix<T>`:
@ -279,22 +404,27 @@ note: required by a bound in `RouteUriBuilder::with_suffix`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:82:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:15:15
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
15 | fn simple(id: usize) { }
| ^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
...
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| -------------------------------------------- in this macro invocation
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket_uri_macro_simple` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:82:37
--> tests/ui-fail-stable/typed-uri-bad-type.rs:84:37
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| --- ^^^^^^^^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Origin<'_>`
| |
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Origin<'_>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `ValidRouteSuffix<T>`:
@ -309,3 +439,124 @@ note: required by a bound in `RouteUriBuilder::with_suffix`
| ----------- required by a bound in this associated function
| where S: ValidRouteSuffix<Origin<'static>>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:47:22
|
47 | uri!(simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:49:17
|
49 | uri!(simple("hello"));
| ^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:51:22
|
51 | uri!(simple(id = 239239i64));
| ^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:58:25
|
58 | uri!(optionals(id = Some(10), name = Ok("bob".into())));
| ^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not implemented for `i32`, which is required by `std::option::Option<i32>: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<i32 as FromUriParam<P, i32>>
<i32 as FromUriParam<P, &'x i32>>
<i32 as FromUriParam<P, &'x mut i32>>
= note: required for `std::option::Option<i32>` to implement `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>`
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:60:19
|
60 | uri!(simple_q("hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:62:24
|
62 | uri!(simple_q(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<isize as FromUriParam<P, isize>>
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:79:40
|
79 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:80:33
|
80 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:83:25
|
83 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> tests/ui-fail-stable/typed-uri-bad-type.rs:84:25
|
84 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
|
= help: the following other types implement trait `FromUriParam<P, T>`:
<usize as FromUriParam<P, usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, &'x mut usize>>
= note: this error originates in the macro `rocket::rocket_internal_uri` which comes from the expansion of the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,285 +1,279 @@
error: expected identifier, found keyword `_`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18
|
63 | uri!(ignored(_ = 10));
| ^
error: route expects 1 parameter but 2 were supplied
= note: route `ignored` has uri "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:69:18
|
69 | uri!(ignored(10, "10"));
| ^^
error: expected unnamed arguments due to ignored parameters
= note: uri for route `ignored` ignores path parameters: "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:67:18
|
67 | uri!(ignored(num = 10));
| ^^^
error: route expects 1 parameter but 2 were supplied
= note: route `ignored` has uri "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:65:18
|
65 | uri!(ignored(10, 20));
| ^^
65 | uri!(ignored(_ = 10));
| ^
error: route expects 1 parameter but 2 were supplied
= note: route `ignored` has uri "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:71:18
|
71 | uri!(ignored(10, "10"));
| ^^^^^^^^
error: expected unnamed arguments due to ignored parameters
= note: uri for route `ignored` ignores 1 path parameters: "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:69:18
|
69 | uri!(ignored(num = 10));
| ^^^^^^^^
error: route expects 1 parameter but 2 were supplied
= note: route `ignored` has uri "/<_>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:67:18
|
67 | uri!(ignored(10, 20));
| ^^^^^^
error: path parameters cannot be ignored
--> tests/ui-fail-stable/typed-uris-bad-params.rs:61:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18
|
61 | uri!(ignored(_));
63 | uri!(ignored(_));
| ^
error: path parameters cannot be ignored
--> tests/ui-fail-stable/typed-uris-bad-params.rs:59:36
--> tests/ui-fail-stable/typed-uris-bad-params.rs:61:36
|
59 | uri!(optionals(id = 10, name = _));
61 | uri!(optionals(id = 10, name = _));
| ^
error: path parameters cannot be ignored
--> tests/ui-fail-stable/typed-uris-bad-params.rs:57:25
--> tests/ui-fail-stable/typed-uris-bad-params.rs:59:25
|
57 | uri!(optionals(id = _, name = "bob".into()));
59 | uri!(optionals(id = _, name = "bob".into()));
| ^
error: invalid parameters for `has_two` route uri
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:57:18
|
57 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:57:28
|
57 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_two` route uri
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18
|
55 | uri!(has_two(id = 100, cookies = "hi"));
| ^^
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18
|
55 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_two` route uri
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^^^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:53:44
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:44
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
55 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^
error: invalid parameters for `has_two` route uri
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18
|
51 | uri!(has_two(name = "hi"));
| ^^^^
53 | uri!(has_two(name = "hi"));
| ^^^^^^^^^^^
error: invalid parameters for `has_two` route uri
= note: uri parameters are: id: i32, name: String
= help: missing parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18
|
49 | uri!(has_two(id = 100, id = 100, ));
| ^^
51 | uri!(has_two(id = 100, id = 100, ));
| ^^^^^^^^^^^^^^^^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:51:28
|
49 | uri!(has_two(id = 100, id = 100, ));
51 | uri!(has_two(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one_guarded` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:26
|
49 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:36
|
49 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^
47 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:47:36
--> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26
|
45 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^
error: [help] unknown parameter: `cookies`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26
|
45 | uri!(has_one_guarded(cookies = "hi", id = 100));
47 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
= help: missing parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:45:18
|
43 | uri!(has_one(name = "hi"));
| ^^^^
45 | uri!(has_one(name = "hi"));
| ^^^^^^^^^^^
error: [help] unknown parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:45:18
|
45 | uri!(has_one(name = "hi"));
| ^^^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18
|
43 | uri!(has_one(name = "hi"));
| ^^^^
43 | uri!(has_one(id = 100, id = 100, ));
| ^^^^^^^^^^^^^^^^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:43:28
|
43 | uri!(has_one(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:41:18
|
41 | uri!(has_one(id = 100, id = 100, ));
| ^^
41 | uri!(has_one(id = 100, id = 100));
| ^^^^^^^^^^^^^^^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:41:28
|
41 | uri!(has_one(id = 100, id = 100, ));
41 | uri!(has_one(id = 100, id = 100));
| ^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18
|
39 | uri!(has_one(id = 100, id = 100));
| ^^
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameters: `name`, `age`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18
|
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:50
|
39 | uri!(has_one(id = 100, id = 100));
39 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^
37 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameters: `name`, `age`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
37 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^
error: [help] duplicate parameter: `id`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:37:50
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^
35 | uri!(has_one(name = 100, id = 100));
| ^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameters: `name`, `age`
error: [help] unknown parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
35 | uri!(has_one(name = 100, id = 100));
| ^^^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18
|
33 | uri!(has_one(name = 100, id = 100));
| ^^^^
33 | uri!(has_one(id = 100, name = "hi"));
| ^^^^^^^^^^^^^^^^^^^^^
error: [help] unknown parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:33:28
|
33 | uri!(has_one(name = 100, id = 100));
| ^^^^
error: invalid parameters for `has_one` route uri
= note: uri parameters are: id: i32
--> tests/ui-fail-stable/typed-uris-bad-params.rs:31:18
|
31 | uri!(has_one(id = 100, name = "hi"));
| ^^
error: [help] unknown parameter: `name`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:31:28
|
31 | uri!(has_one(id = 100, name = "hi"));
33 | uri!(has_one(id = 100, name = "hi"));
| ^^^^
error: route expects 2 parameters but 1 was supplied
= note: route `has_two` has uri "/<id>?<name>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:29:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:31:18
|
29 | uri!(has_two(10));
31 | uri!(has_two(10));
| ^^
error: route expects 2 parameters but 3 were supplied
= note: route `has_two` has uri "/<id>?<name>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:28:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:30:18
|
28 | uri!(has_two(10, "hi", "there"));
| ^^
30 | uri!(has_two(10, "hi", "there"));
| ^^^^^^^^^^^^^^^^^
error: route expects 1 parameter but 2 were supplied
= note: route `has_one_guarded` has uri "/<id>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:26:26
--> tests/ui-fail-stable/typed-uris-bad-params.rs:28:26
|
26 | uri!(has_one_guarded("hi", 100));
| ^^^^
28 | uri!(has_one_guarded("hi", 100));
| ^^^^^^^^^
error: route expects 1 parameter but 2 were supplied
= note: route `has_one` has uri "/<id>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:25:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:27:18
|
25 | uri!(has_one("Hello", 23, ));
| ^^^^^^^
27 | uri!(has_one("Hello", 23, ));
| ^^^^^^^^^^^^
error: route expects 1 parameter but 2 were supplied
= note: route `has_one` has uri "/<id>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:24:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:26:18
|
24 | uri!(has_one(1, 23));
| ^
26 | uri!(has_one(1, 23));
| ^^^^^
error: route expects 1 parameter but 0 were supplied
= note: route `has_one` has uri "/<id>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:22:10
--> tests/ui-fail-stable/typed-uris-bad-params.rs:24:10
|
22 | uri!(has_one());
24 | uri!(has_one());
| ^^^^^^^
error: route expects 1 parameter but 0 were supplied
= note: route `has_one` has uri "/<id>"
--> tests/ui-fail-stable/typed-uris-bad-params.rs:21:10
--> tests/ui-fail-stable/typed-uris-bad-params.rs:23:10
|
21 | uri!(has_one);
23 | uri!(has_one);
| ^^^^^^^
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37
--> tests/ui-fail-stable/typed-uris-bad-params.rs:17:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected `Empty`, found `&str`
error[E0271]: type mismatch resolving `<String as FromParam<'_>>::Error == &str`
--> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected `&str`, found `Empty`
17 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected `Empty`, found `&str`

View File

@ -8,13 +8,13 @@ error: named and unnamed parameters cannot be mixed
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:11:17
|
11 | uri!(simple(id = 100, "Hello"));
| ^^
| ^^^^^^^^^^^^^^^^^
error: named and unnamed parameters cannot be mixed
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:12:17
|
12 | uri!(simple("Hello", id = 100));
| ^^^^^^^
| ^^^^^^^^^^^^^^^^^
error: unexpected token
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:14:16
@ -23,16 +23,16 @@ error: unexpected token
| ^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:16:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:16:16
|
16 | uri!("mount", simple);
| ^^^^^^^
| ^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:17:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:17:16
|
17 | uri!("mount", simple, "http://");
| ^^^^^^^
| ^
error: URI suffix must contain only query and/or fragment
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:18:28
@ -47,10 +47,10 @@ error: expected 1, 2, or 3 arguments, found 4
| ^^^^^^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:20:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:20:16
|
20 | uri!("mount", simple(10, "hi"), "http://");
| ^^^^^^^
| ^
error: URI suffix must contain only query and/or fragment
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:21:38
@ -77,10 +77,10 @@ error: expected 1, 2, or 3 arguments, found 4
| ^^^^^^
error: invalid URI: unexpected token '<' at index 7
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:18
|
25 | uri!("/mount/<id>", simple);
| ^^^^^^^^^^^^^
| ^
error: expected at least 1 argument, found none
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:26:5
@ -103,10 +103,10 @@ error: unexpected end of input, expected an expression
| ^
error: invalid URI: unexpected EOF: expected some token at index 0
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:29:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:29:11
|
29 | uri!("*", simple(10), "hi");
| ^^^
| ^
error: URI suffix must contain only query and/or fragment
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:30:40
@ -145,7 +145,7 @@ error: URI suffix must contain only query and/or fragment
| ^^^^^^^^^
error: route expects 2 parameters but 0 were supplied
= note: route `simple` has uri "/<id>/<name>"
= note: route `simple` has uri "/<_id>/<_name>"
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:13:10
|
13 | uri!(simple,);

View File

@ -1,11 +1,11 @@
error: fieldless structs are not supported
--> $DIR/uri_display.rs:4:1
--> tests/ui-fail-stable/uri_display.rs:4:1
|
4 | struct Foo1;
| ^^^^^^
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:3:10
--> tests/ui-fail-stable/uri_display.rs:3:10
|
3 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
@ -13,13 +13,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
error: fieldless structs are not supported
--> $DIR/uri_display.rs:7:1
--> tests/ui-fail-stable/uri_display.rs:7:1
|
7 | struct Foo2();
| ^^^^^^
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:6:10
--> tests/ui-fail-stable/uri_display.rs:6:10
|
6 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
@ -27,13 +27,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
error: empty enums are not supported
--> $DIR/uri_display.rs:10:11
--> tests/ui-fail-stable/uri_display.rs:10:11
|
10 | enum Foo3 { }
| ^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:9:10
--> tests/ui-fail-stable/uri_display.rs:9:10
|
9 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
@ -41,13 +41,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
error: tuple structs or variants must have exactly one field
--> $DIR/uri_display.rs:18:12
--> tests/ui-fail-stable/uri_display.rs:18:12
|
18 | struct Foo5(String, String);
| ^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:17:10
--> tests/ui-fail-stable/uri_display.rs:17:10
|
17 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
@ -55,13 +55,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare integer literal
--> $DIR/uri_display.rs:22:20
--> tests/ui-fail-stable/uri_display.rs:22:20
|
22 | #[field(name = 123)]
| ^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:20:10
--> tests/ui-fail-stable/uri_display.rs:20:10
|
20 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
@ -69,13 +69,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayQuery` (in Nightly builds, run with -Z macro-backtrace for more info)
error: struct must have exactly one field
--> $DIR/uri_display.rs:27:12
--> tests/ui-fail-stable/uri_display.rs:27:12
|
27 | struct Foo7(String, usize);
| ^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:26:10
--> tests/ui-fail-stable/uri_display.rs:26:10
|
26 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
@ -83,13 +83,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info)
error: struct must have exactly one field
--> $DIR/uri_display.rs:30:1
--> tests/ui-fail-stable/uri_display.rs:30:1
|
30 | struct Foo8;
| ^^^^^^
| ^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:29:10
--> tests/ui-fail-stable/uri_display.rs:29:10
|
29 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
@ -97,13 +97,13 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info)
error: enums are not supported
--> $DIR/uri_display.rs:33:1
--> tests/ui-fail-stable/uri_display.rs:33:1
|
33 | enum Foo9 { }
| ^^^^
| ^^^^^^^^^^^^^^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:32:10
--> tests/ui-fail-stable/uri_display.rs:32:10
|
32 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
@ -111,13 +111,15 @@ error: [note] error occurred while deriving `UriDisplay`
= note: this error originates in the derive macro `UriDisplayPath` (in Nightly builds, run with -Z macro-backtrace for more info)
error: named structs are not supported
--> $DIR/uri_display.rs:36:1
--> tests/ui-fail-stable/uri_display.rs:36:1
|
36 | struct Foo10 {
| ^^^^^^
36 | / struct Foo10 {
37 | | named: usize
38 | | }
| |_^
error: [note] error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:35:10
--> tests/ui-fail-stable/uri_display.rs:35:10
|
35 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^

View File

@ -2,7 +2,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:6:13
|
6 | struct Bar1(BadType);
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -25,7 +25,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:10:5
|
10 | field: BadType,
| ^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -48,7 +48,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:16:5
|
16 | bad: BadType,
| ^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -71,7 +71,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:21:11
|
21 | Inner(BadType),
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -96,7 +96,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:27:9
|
27 | field: BadType,
| ^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -121,7 +121,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query
--> tests/ui-fail-stable/uri_display_type_errors.rs:35:9
|
35 | other: BadType,
| ^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`
| ^^^^^^^^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Query>` is not implemented for `BadType`, which is required by `&&BadType: UriDisplay<rocket::http::uri::fmt::Query>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>
@ -146,7 +146,7 @@ error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Path>
--> tests/ui-fail-stable/uri_display_type_errors.rs:40:12
|
40 | struct Baz(BadType);
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Path>` is not implemented for `BadType`
| ^^^^^^^ the trait `UriDisplay<rocket::http::uri::fmt::Path>` is not implemented for `BadType`, which is required by `&BadType: UriDisplay<rocket::http::uri::fmt::Path>`
|
= help: the following other types implement trait `UriDisplay<P>`:
<bool as UriDisplay<P>>

View File

@ -27,6 +27,6 @@ fn e5(_request: &Request) { }
fn e5(_request: &Request) { }
#[catch(404)]
fn f3(_request: &Request, other: bool) { }
fn f3(_request: &Request, _other: bool) { }
fn main() { }

View File

@ -2,25 +2,25 @@
struct Q;
#[get("/<foo>")]
fn f0(foo: Q) {}
#[get("/<_foo>")]
fn f0(_foo: Q) {}
#[get("/<foo..>")]
fn f1(foo: Q) {}
#[get("/<_foo..>")]
fn f1(_foo: Q) {}
#[get("/?<foo>")]
fn f2(foo: Q) {}
#[get("/?<_foo>")]
fn f2(_foo: Q) {}
#[get("/?<foo..>")]
fn f3(foo: Q) {}
#[get("/?<_foo..>")]
fn f3(_foo: Q) {}
#[post("/", data = "<foo>")]
fn f4(foo: Q) {}
#[post("/", data = "<_foo>")]
fn f4(_foo: Q) {}
#[get("/<foo>")]
fn f5(a: Q, foo: Q) {}
#[get("/<_foo>")]
fn f5(_a: Q, _foo: Q) {}
#[get("/<foo>/other/<bar>/<good>/okay")]
fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
#[get("/<_foo>/other/<_bar>/<_good>/okay")]
fn f6(_a: Q, _foo: Q, _good: usize, _bar: Q) {}
fn main() { }

View File

@ -13,6 +13,10 @@ fn f1() {}
#[get("/", format = "x-custom/x-custom")]
fn f2() {}
#[suppress(unknown_format)]
#[get("/", format = "x-custom/x-custom")]
fn f3() {}
// Check if a data argument is used with a usually non-payload bearing method.
#[get("/", data = "<_foo>")]
@ -21,6 +25,10 @@ fn g0(_foo: rocket::Data<'_>) {}
#[head("/", data = "<_foo>")]
fn g1(_foo: rocket::Data<'_>) {}
#[suppress(dubious_payload)]
#[head("/", data = "<_foo>")]
fn g2(_foo: rocket::Data<'_>) {}
fn main() {
compile_error!("checking for warnings!")
}

View File

@ -1,3 +1,5 @@
#![allow(unused_variables)]
#[macro_use] extern crate rocket;
use rocket::request::FromParam;

View File

@ -1,3 +1,5 @@
#![allow(unused_variables)]
#[macro_use] extern crate rocket;
use rocket::http::CookieJar;

View File

@ -3,8 +3,8 @@
#[get("/")]
fn index() { }
#[post("/<id>/<name>")]
fn simple(id: i32, name: String) -> &'static str { "" }
#[post("/<_id>/<_name>")]
fn simple(_id: i32, _name: String) -> &'static str { "" }
fn main() {
uri!(simple: id = 100, "Hello");

View File

@ -184,7 +184,7 @@ function test_default() {
function test_ui() {
echo ":: Testing compile-time UI output..."
indir "${PROJECT_ROOT}" $CARGO test ui --all --all-features -- --ignored $@
indir "${PROJECT_ROOT}" $CARGO test --test ui-fail --all --all-features -- --ignored $@
}
function run_benchmarks() {