Update codebase for latest nightly and stable.

This commit is contained in:
Sergio Benitez 2022-02-16 10:08:55 -08:00
parent 815e8a242f
commit 0ba5aac53e
46 changed files with 1403 additions and 1403 deletions

View File

@ -1,99 +1,99 @@
error: invalid value: expected string literal
--> $DIR/database-syntax.rs:4:12
--> tests/ui-fail-nightly/database-syntax.rs:4:12
|
4 | #[database(123)]
| ^^^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:3:10
--> tests/ui-fail-nightly/database-syntax.rs:3:10
|
3 | #[derive(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-nightly/database-syntax.rs:8:25
|
8 | #[database("some-name", "another")]
| ^^^^^^^^^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:7:10
--> tests/ui-fail-nightly/database-syntax.rs:7:10
|
7 | #[derive(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-nightly/database-syntax.rs:12:25
|
12 | #[database("some-name", name = "another")]
| ^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:11:10
--> tests/ui-fail-nightly/database-syntax.rs:11:10
|
11 | #[derive(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-nightly/database-syntax.rs:16:1
|
16 | / #[database("foo")]
17 | | enum D { }
| |___________^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:15:10
--> tests/ui-fail-nightly/database-syntax.rs:15:10
|
15 | #[derive(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-nightly/database-syntax.rs:20:1
|
20 | struct E(deadpool_postgres::Pool);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:19:10
--> tests/ui-fail-nightly/database-syntax.rs:19:10
|
19 | #[derive(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-nightly/database-syntax.rs:23:1
|
23 | / #[database("foo")]
24 | | struct F;
| |_________^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:22:10
--> tests/ui-fail-nightly/database-syntax.rs:22:10
|
22 | #[derive(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-nightly/database-syntax.rs:27:1
|
27 | / #[database("foo")]
28 | | struct G(deadpool_postgres::Pool, deadpool_postgres::Pool);
| |___________________________________________________________^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:26:10
--> tests/ui-fail-nightly/database-syntax.rs:26:10
|
26 | #[derive(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-nightly/database-syntax.rs:31:1
|
31 | / #[database("foo")]
32 | | struct H {
@ -102,7 +102,7 @@ error: named structs are not supported
| |_^
|
note: error occurred while deriving `Database`
--> $DIR/database-syntax.rs:30:10
--> tests/ui-fail-nightly/database-syntax.rs:30:10
|
30 | #[derive(Database)]
| ^^^^^^^^

View File

@ -1,23 +1,23 @@
error[E0277]: the trait bound `Unknown: Pool` is not satisfied
--> $DIR/database-types.rs:7:10
--> tests/ui-fail-nightly/database-types.rs:7:10
|
7 | struct A(Unknown);
| ^^^^^^^ the trait `Pool` is not implemented for `Unknown`
|
note: required by a bound in `rocket_db_pools::Database::Pool`
--> $DIR/database.rs:41:16
--> $WORKSPACE/contrib/db_pools/lib/src/database.rs
|
41 | type Pool: Pool;
| type Pool: Pool;
| ^^^^ required by this bound in `rocket_db_pools::Database::Pool`
error[E0277]: the trait bound `Vec<i32>: Pool` is not satisfied
--> $DIR/database-types.rs:11:10
--> tests/ui-fail-nightly/database-types.rs:11:10
|
11 | struct B(Vec<i32>);
| ^^^^^^^^ the trait `Pool` is not implemented for `Vec<i32>`
|
note: required by a bound in `rocket_db_pools::Database::Pool`
--> $DIR/database.rs:41:16
--> $WORKSPACE/contrib/db_pools/lib/src/database.rs
|
41 | type Pool: Pool;
| type Pool: Pool;
| ^^^^ required by this bound in `rocket_db_pools::Database::Pool`

View File

@ -1,21 +1,23 @@
error[E0277]: the trait bound `Unknown: Pool` is not satisfied
--> $DIR/database-types.rs:7:10
--> tests/ui-fail-stable/database-types.rs:7:10
|
7 | struct A(Unknown);
| ^^^^^^^ the trait `Pool` is not implemented for `Unknown`
|
::: $WORKSPACE/contrib/db_pools/lib/src/database.rs
note: required by a bound in `rocket_db_pools::Database::Pool`
--> $WORKSPACE/contrib/db_pools/lib/src/database.rs
|
| type Pool: Pool;
| ---- required by this bound in `rocket_db_pools::Database::Pool`
| ^^^^ required by this bound in `rocket_db_pools::Database::Pool`
error[E0277]: the trait bound `Vec<i32>: Pool` is not satisfied
--> $DIR/database-types.rs:11:10
--> tests/ui-fail-stable/database-types.rs:11:10
|
11 | struct B(Vec<i32>);
| ^^^ the trait `Pool` is not implemented for `Vec<i32>`
|
::: $WORKSPACE/contrib/db_pools/lib/src/database.rs
note: required by a bound in `rocket_db_pools::Database::Pool`
--> $WORKSPACE/contrib/db_pools/lib/src/database.rs
|
| type Pool: Pool;
| ---- required by this bound in `rocket_db_pools::Database::Pool`
| ^^^^ required by this bound in `rocket_db_pools::Database::Pool`

View File

@ -1,7 +1,7 @@
use proc_macro::TokenStream;
use devise::{Spanned, Result, ext::SpanDiagnosticExt};
use crate::syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility};
use crate::syn::{Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility};
#[derive(Debug)]
struct DatabaseInvocation {
@ -11,8 +11,6 @@ struct DatabaseInvocation {
visibility: Visibility,
/// The database name as passed in via #[database('database name')].
db_name: String,
/// The entire structure that the `database` attribute was called on.
structure: DataStruct,
/// The type inside the structure: struct MyDb(ThisType).
connection_type: Type,
}
@ -47,7 +45,6 @@ fn parse_invocation(attr: TokenStream, input: TokenStream) -> Result<DatabaseInv
};
Ok(DatabaseInvocation {
structure,
type_name: input.ident,
visibility: input.vis,
db_name: string_lit.value(),

View File

@ -1,5 +1,5 @@
error: unexpected end of input, expected string literal
--> $DIR/database-syntax.rs:6:1
--> tests/ui-fail-nightly/database-syntax.rs:6:1
|
6 | #[database]
| ^^^^^^^^^^^
@ -7,31 +7,31 @@ error: unexpected end of input, expected string literal
= note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected string literal
--> $DIR/database-syntax.rs:9:12
--> tests/ui-fail-nightly/database-syntax.rs:9:12
|
9 | #[database(1)]
| ^
error: expected string literal
--> $DIR/database-syntax.rs:12:12
--> tests/ui-fail-nightly/database-syntax.rs:12:12
|
12 | #[database(123)]
| ^^^
error: unexpected token
--> $DIR/database-syntax.rs:15:20
--> tests/ui-fail-nightly/database-syntax.rs:15:20
|
15 | #[database("hello" "hi")]
| ^^^^
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:19:1
--> tests/ui-fail-nightly/database-syntax.rs:19:1
|
19 | enum Foo { }
| ^^^^^^^^^^^^^
error: `database` attribute can only be applied to structs with exactly one unnamed field
--> $DIR/database-syntax.rs:22:11
--> tests/ui-fail-nightly/database-syntax.rs:22:11
|
22 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -39,19 +39,19 @@ error: `database` attribute can only be applied to structs with exactly one unna
= help: example: `struct MyDatabase(diesel::SqliteConnection);`
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:25:1
--> tests/ui-fail-nightly/database-syntax.rs:25:1
|
25 | union Baz { }
| ^^^^^^^^^^^^^^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:28:9
--> tests/ui-fail-nightly/database-syntax.rs:28:9
|
28 | struct E<'r>(&'r str);
| ^^^^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:31:9
--> tests/ui-fail-nightly/database-syntax.rs:31:9
|
31 | struct F<T>(T);
| ^^^

View File

@ -1,23 +1,23 @@
error[E0277]: the trait bound `Unknown: Poolable` is not satisfied
--> $DIR/database-types.rs:6:10
--> tests/ui-fail-nightly/database-types.rs:6:10
|
6 | struct A(Unknown);
| ^^^^^^^ the trait `Poolable` is not implemented for `Unknown`
|
note: required by a bound in `rocket_sync_db_pools::Connection`
--> $DIR/connection.rs:44:29
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
44 | pub struct Connection<K, C: Poolable> {
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> $DIR/database-types.rs:9:10
--> 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`
--> $DIR/connection.rs:44:29
--> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
|
44 | pub struct Connection<K, C: Poolable> {
| pub struct Connection<K, C: Poolable> {
| ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection`

View File

@ -1,5 +1,5 @@
error: unexpected end of input, expected string literal
--> $DIR/database-syntax.rs:6:1
--> tests/ui-fail-stable/database-syntax.rs:6:1
|
6 | #[database]
| ^^^^^^^^^^^
@ -7,50 +7,50 @@ error: unexpected end of input, expected string literal
= note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected string literal
--> $DIR/database-syntax.rs:9:12
--> tests/ui-fail-stable/database-syntax.rs:9:12
|
9 | #[database(1)]
| ^
error: expected string literal
--> $DIR/database-syntax.rs:12:12
--> tests/ui-fail-stable/database-syntax.rs:12:12
|
12 | #[database(123)]
| ^^^
error: unexpected token
--> $DIR/database-syntax.rs:15:20
--> tests/ui-fail-stable/database-syntax.rs:15:20
|
15 | #[database("hello" "hi")]
| ^^^^
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:19:1
--> tests/ui-fail-stable/database-syntax.rs:19:1
|
19 | enum Foo { }
| ^^^^
error: `database` attribute can only be applied to structs with exactly one unnamed field
--- help: example: `struct MyDatabase(diesel::SqliteConnection);`
--> $DIR/database-syntax.rs:22:11
--> tests/ui-fail-stable/database-syntax.rs:22:11
|
22 | struct Bar(diesel::SqliteConnection, diesel::SqliteConnection);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `database` attribute can only be used on structs
--> $DIR/database-syntax.rs:25:1
--> tests/ui-fail-stable/database-syntax.rs:25:1
|
25 | union Baz { }
| ^^^^^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:28:9
--> tests/ui-fail-stable/database-syntax.rs:28:9
|
28 | struct E<'r>(&'r str);
| ^
error: `database` attribute cannot be applied to structs with generics
--> $DIR/database-syntax.rs:31:9
--> tests/ui-fail-stable/database-syntax.rs:31:9
|
31 | struct F<T>(T);
| ^

View File

@ -1,21 +1,23 @@
error[E0277]: the trait bound `Unknown: Poolable` is not satisfied
--> $DIR/database-types.rs:6:10
--> tests/ui-fail-stable/database-types.rs:6:10
|
6 | struct A(Unknown);
| ^^^^^^^ the trait `Poolable` is not implemented for `Unknown`
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
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 `rocket_sync_db_pools::Connection`
| ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection`
error[E0277]: the trait bound `Vec<i32>: Poolable` is not satisfied
--> $DIR/database-types.rs:9:10
--> tests/ui-fail-stable/database-types.rs:9:10
|
9 | struct B(Vec<i32>);
| ^^^ the trait `Poolable` is not implemented for `Vec<i32>`
|
::: $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs
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 `rocket_sync_db_pools::Connection`
| ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection`

View File

@ -1,120 +1,120 @@
error: attribute can only be applied to `async` functions
--> $DIR/async-entry.rs:4:5
--> tests/ui-fail-nightly/async-entry.rs:4:5
|
4 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function must be `async`
--> $DIR/async-entry.rs:5:5
--> tests/ui-fail-nightly/async-entry.rs:5:5
|
5 | fn foo() { }
| ^^^^^^^^
= note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: attribute is typically applied to `main` function
--> $DIR/async-entry.rs:10:5
--> tests/ui-fail-nightly/async-entry.rs:10:5
|
10 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function is not `main`
--> $DIR/async-entry.rs:11:14
--> tests/ui-fail-nightly/async-entry.rs:11:14
|
11 | async fn foo() { }
| ^^^
= 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
--> $DIR/async-entry.rs:16:5
--> tests/ui-fail-nightly/async-entry.rs:16:5
|
16 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function must be `async`
--> $DIR/async-entry.rs:17:5
--> tests/ui-fail-nightly/async-entry.rs:17:5
|
17 | fn main() {
| ^^^^^^^^^
= note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:49:5
--> tests/ui-fail-nightly/async-entry.rs:49:5
|
49 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:50:8
--> tests/ui-fail-nightly/async-entry.rs:50:8
|
50 | fn main() -> rocekt::Rocket<rocket::Build> {
| ^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to functions that return a value
--> $DIR/async-entry.rs:56:5
--> tests/ui-fail-nightly/async-entry.rs:56:5
|
56 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
note: this function must return a value
--> $DIR/async-entry.rs:57:5
--> tests/ui-fail-nightly/async-entry.rs:57:5
|
57 | async fn rocket() {
| ^^^^^^^^^^^^^^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to functions that return a value
--> $DIR/async-entry.rs:64:5
--> tests/ui-fail-nightly/async-entry.rs:64:5
|
64 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
note: this function must return a value
--> $DIR/async-entry.rs:65:5
--> tests/ui-fail-nightly/async-entry.rs:65:5
|
65 | fn rocket() {
| ^^^^^^^^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:79:5
--> tests/ui-fail-nightly/async-entry.rs:79:5
|
79 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:80:8
--> tests/ui-fail-nightly/async-entry.rs:80:8
|
80 | fn main() -> &'static str {
| ^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:87:5
--> tests/ui-fail-nightly/async-entry.rs:87:5
|
87 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:88:14
--> tests/ui-fail-nightly/async-entry.rs:88:14
|
88 | async fn main() -> _ {
| ^^^^
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/async-entry.rs:73:17
--> tests/ui-fail-nightly/async-entry.rs:73:41
|
72 | fn rocket() -> _ {
| ------ this is not `async`
73 | let _ = rocket::build().launch().await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
| ^^^^^^ only allowed inside `async` functions and blocks
error[E0308]: mismatched types
--> $DIR/async-entry.rs:35:9
--> tests/ui-fail-nightly/async-entry.rs:35:9
|
35 | rocket::build()
| ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket`
@ -123,7 +123,7 @@ error[E0308]: mismatched types
found struct `Rocket<Build>`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:44:9
--> tests/ui-fail-nightly/async-entry.rs:44:9
|
44 | "hi".to_string()
| ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String`
@ -132,7 +132,7 @@ error[E0308]: mismatched types
found struct `std::string::String`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:24:21
--> tests/ui-fail-nightly/async-entry.rs:24:21
|
24 | async fn main() {
| ^ expected `()` because of default return type
@ -148,7 +148,7 @@ error[E0308]: mismatched types
found struct `Rocket<Build>`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:33:26
--> tests/ui-fail-nightly/async-entry.rs:33:26
|
33 | async fn rocket() -> String {
| ^^^^^^
@ -160,7 +160,7 @@ error[E0308]: mismatched types
found struct `std::string::String`
error[E0277]: `main` has invalid return type `Rocket<Build>`
--> $DIR/async-entry.rs:94:20
--> tests/ui-fail-nightly/async-entry.rs:94:20
|
94 | async fn main() -> rocket::Rocket<rocket::Build> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`

View File

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

View File

@ -1,5 +1,5 @@
error: expected `fn`
--> $DIR/catch.rs:6:1
--> tests/ui-fail-nightly/catch.rs:6:1
|
6 | struct Catcher(String);
| ^^^^^^
@ -7,7 +7,7 @@ error: expected `fn`
= help: `#[catch]` can only be used on functions
error: expected `fn`
--> $DIR/catch.rs:9:7
--> tests/ui-fail-nightly/catch.rs:9:7
|
9 | const CATCH: &str = "Catcher";
| ^^^^^
@ -15,7 +15,7 @@ error: expected `fn`
= help: `#[catch]` can only be used on functions
error: expected integer or `default`, found string literal
--> $DIR/catch.rs:11:9
--> tests/ui-fail-nightly/catch.rs:11:9
|
11 | #[catch("404")]
| ^^^^^
@ -23,7 +23,7 @@ error: expected integer or `default`, found string literal
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error: unexpected keyed parameter: expected literal or identifier
--> $DIR/catch.rs:14:9
--> tests/ui-fail-nightly/catch.rs:14:9
|
14 | #[catch(code = "404")]
| ^^^^^^^^^^^^
@ -31,7 +31,7 @@ error: unexpected keyed parameter: expected literal or identifier
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error: unexpected keyed parameter: expected literal or identifier
--> $DIR/catch.rs:17:9
--> tests/ui-fail-nightly/catch.rs:17:9
|
17 | #[catch(code = 404)]
| ^^^^^^^^^^
@ -39,7 +39,7 @@ error: unexpected keyed parameter: expected literal or identifier
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error: status must be in range [100, 599]
--> $DIR/catch.rs:20:9
--> tests/ui-fail-nightly/catch.rs:20:9
|
20 | #[catch(99)]
| ^^
@ -47,7 +47,7 @@ error: status must be in range [100, 599]
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error: status must be in range [100, 599]
--> $DIR/catch.rs:23:9
--> tests/ui-fail-nightly/catch.rs:23:9
|
23 | #[catch(600)]
| ^^^
@ -55,7 +55,7 @@ error: status must be in range [100, 599]
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error: unexpected attribute parameter: `message`
--> $DIR/catch.rs:26:14
--> tests/ui-fail-nightly/catch.rs:26:14
|
26 | #[catch(400, message = "foo")]
| ^^^^^^^^^^^^^^^
@ -63,13 +63,13 @@ error: unexpected attribute parameter: `message`
= help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
error[E0308]: mismatched types
--> $DIR/catch.rs:30:17
--> tests/ui-fail-nightly/catch.rs:30:17
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^^^^^^^ expected `&rocket::Request<'_>`, found struct `Status`
error[E0308]: mismatched types
--> $DIR/catch.rs:30:34
--> tests/ui-fail-nightly/catch.rs:30:34
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^^^ expected `bool`, found `&rocket::Request<'_>`

View File

@ -1,53 +1,37 @@
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:6:30
--> tests/ui-fail-nightly/catch_type_errors.rs:6:30
|
5 | #[catch(404)]
| ------------- required by a bound introduced by this call
6 | fn f1(_request: &Request) -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:11:30
--> tests/ui-fail-nightly/catch_type_errors.rs:11:30
|
10 | #[catch(404)]
| ------------- required by a bound introduced by this call
11 | fn f2(_request: &Request) -> bool {
| ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/catch_type_errors.rs:16:17
--> tests/ui-fail-nightly/catch_type_errors.rs:16:17
|
16 | fn f3(_request: bool) -> usize {
| ^^^^ expected `bool`, found `&rocket::Request<'_>`
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:16:26
--> tests/ui-fail-nightly/catch_type_errors.rs:16:26
|
15 | #[catch(404)]
| ------------- required by a bound introduced by this call
16 | fn f3(_request: bool) -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:21:12
--> tests/ui-fail-nightly/catch_type_errors.rs:21:12
|
20 | #[catch(404)]
| ------------- required by a bound introduced by this call
21 | fn f4() -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,17 +1,17 @@
error: expected `,`
--> $DIR/catchers.rs:4:25
--> tests/ui-fail-nightly/catchers.rs:4:25
|
4 | let _ = catchers![a b];
| ^
error: expected identifier
--> $DIR/catchers.rs:6:26
--> tests/ui-fail-nightly/catchers.rs:6:26
|
6 | let _ = catchers![a::, ];
| ^
error: unexpected end of input, expected identifier
--> $DIR/catchers.rs:7:13
--> tests/ui-fail-nightly/catchers.rs:7:13
|
7 | let _ = catchers![a::];
| ^^^^^^^^^^^^^^

View File

@ -1,222 +1,222 @@
error: enums are not supported
--> $DIR/from_form.rs:4:1
--> tests/ui-fail-nightly/from_form.rs:4:1
|
4 | enum Thing { }
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:3:10
--> tests/ui-fail-nightly/from_form.rs:3:10
|
3 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> $DIR/from_form.rs:7:1
--> tests/ui-fail-nightly/from_form.rs:7:1
|
7 | struct Foo1;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:6:10
--> tests/ui-fail-nightly/from_form.rs:6:10
|
6 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> $DIR/from_form.rs:10:13
--> tests/ui-fail-nightly/from_form.rs:10:13
|
10 | struct Foo2 { }
| ^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:9:10
--> tests/ui-fail-nightly/from_form.rs:9:10
|
9 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: tuple struct must have exactly one field
--> $DIR/from_form.rs:16:12
--> tests/ui-fail-nightly/from_form.rs:16:12
|
16 | struct Foo4(usize, usize, usize);
| ^^^^^^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:15:10
--> tests/ui-fail-nightly/from_form.rs:15:10
|
15 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one lifetime is supported
--> $DIR/from_form.rs:19:25
--> tests/ui-fail-nightly/from_form.rs:19:25
|
19 | struct NextTodoTask<'f, 'a> {
| ^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:18:10
--> tests/ui-fail-nightly/from_form.rs:18:10
|
18 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:28:20
--> tests/ui-fail-nightly/from_form.rs:28:20
|
28 | #[field(name = "isindex")]
| ^^^^^^^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:26:10
--> tests/ui-fail-nightly/from_form.rs:26:10
|
26 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:36:5
--> tests/ui-fail-nightly/from_form.rs:36:5
|
36 | foo: usize,
| ^^^
|
help: declared in this field
--> $DIR/from_form.rs:36:5
--> tests/ui-fail-nightly/from_form.rs:36:5
|
36 | foo: usize,
| ^^^^^^^^^^
note: previous field with conflicting name
--> $DIR/from_form.rs:34:5
--> tests/ui-fail-nightly/from_form.rs:34:5
|
34 | / #[field(name = "foo")]
35 | | field: String,
| |_________________^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:32:10
--> tests/ui-fail-nightly/from_form.rs:32:10
|
32 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:43:20
--> tests/ui-fail-nightly/from_form.rs:43:20
|
43 | #[field(name = "hello")]
| ^^^^^^^
|
help: declared in this field
--> $DIR/from_form.rs:43:5
--> tests/ui-fail-nightly/from_form.rs:43:5
|
43 | / #[field(name = "hello")]
44 | | other: String,
| |_________________^
note: previous field with conflicting name
--> $DIR/from_form.rs:41:5
--> tests/ui-fail-nightly/from_form.rs:41:5
|
41 | / #[field(name = "hello")]
42 | | first: String,
| |_________________^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:39:10
--> tests/ui-fail-nightly/from_form.rs:39:10
|
39 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:50:20
--> tests/ui-fail-nightly/from_form.rs:50:20
|
50 | #[field(name = "first")]
| ^^^^^^^
|
help: declared in this field
--> $DIR/from_form.rs:50:5
--> tests/ui-fail-nightly/from_form.rs:50:5
|
50 | / #[field(name = "first")]
51 | | other: String,
| |_________________^
note: previous field with conflicting name
--> $DIR/from_form.rs:49:5
--> tests/ui-fail-nightly/from_form.rs:49:5
|
49 | first: String,
| ^^^^^^^^^^^^^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:47:10
--> tests/ui-fail-nightly/from_form.rs:47:10
|
47 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `field`
--> $DIR/from_form.rs:56:28
--> tests/ui-fail-nightly/from_form.rs:56:28
|
56 | #[field(name = "blah", field = "bloo")]
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:54:10
--> tests/ui-fail-nightly/from_form.rs:54:10
|
54 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[field(..)]`, found bare path "field"
--> $DIR/from_form.rs:62:7
--> tests/ui-fail-nightly/from_form.rs:62:7
|
62 | #[field]
| ^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:60:10
--> tests/ui-fail-nightly/from_form.rs:60:10
|
60 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> $DIR/from_form.rs:68:13
--> tests/ui-fail-nightly/from_form.rs:68:13
|
68 | #[field("blah")]
| ^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:66:10
--> tests/ui-fail-nightly/from_form.rs:66:10
|
66 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> $DIR/from_form.rs:74:13
--> tests/ui-fail-nightly/from_form.rs:74:13
|
74 | #[field(123)]
| ^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:72:10
--> tests/ui-fail-nightly/from_form.rs:72:10
|
72 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `beep`
--> $DIR/from_form.rs:80:13
--> tests/ui-fail-nightly/from_form.rs:80:13
|
80 | #[field(beep = "bop")]
| ^^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:78:10
--> tests/ui-fail-nightly/from_form.rs:78:10
|
78 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field has conflicting names
--> $DIR/from_form.rs:86:5
--> tests/ui-fail-nightly/from_form.rs:86:5
|
86 | / #[field(name = "blah")]
87 | | #[field(name = "blah")]
@ -224,218 +224,218 @@ error: field has conflicting names
| |____________________^
|
note: this field name...
--> $DIR/from_form.rs:86:20
--> tests/ui-fail-nightly/from_form.rs:86:20
|
86 | #[field(name = "blah")]
| ^^^^^^
note: ...conflicts with this field name
--> $DIR/from_form.rs:87:20
--> tests/ui-fail-nightly/from_form.rs:87:20
|
87 | #[field(name = "blah")]
| ^^^^^^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:84:10
--> tests/ui-fail-nightly/from_form.rs:84:10
|
84 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare boolean literal
--> $DIR/from_form.rs:93:20
--> tests/ui-fail-nightly/from_form.rs:93:20
|
93 | #[field(name = true)]
| ^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:91:10
--> tests/ui-fail-nightly/from_form.rs:91:10
|
91 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found bare path "name"
--> $DIR/from_form.rs:99:13
--> tests/ui-fail-nightly/from_form.rs:99:13
|
99 | #[field(name)]
| ^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:97:10
--> tests/ui-fail-nightly/from_form.rs:97:10
|
97 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare integer literal
--> $DIR/from_form.rs:105:20
--> tests/ui-fail-nightly/from_form.rs:105:20
|
105 | #[field(name = 123)]
| ^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:103:10
--> tests/ui-fail-nightly/from_form.rs:103:10
|
103 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:111:20
--> tests/ui-fail-nightly/from_form.rs:111:20
|
111 | #[field(name = "hello&world")]
| ^^^^^^^^^^^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:109:10
--> tests/ui-fail-nightly/from_form.rs:109:10
|
109 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:117:20
--> tests/ui-fail-nightly/from_form.rs:117:20
|
117 | #[field(name = "!@#$%^&*()_")]
| ^^^^^^^^^^^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:115:10
--> tests/ui-fail-nightly/from_form.rs:115:10
|
115 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:123:20
--> tests/ui-fail-nightly/from_form.rs:123:20
|
123 | #[field(name = "?")]
| ^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:121:10
--> tests/ui-fail-nightly/from_form.rs:121:10
|
121 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:129:20
--> tests/ui-fail-nightly/from_form.rs:129:20
|
129 | #[field(name = "")]
| ^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:127:10
--> tests/ui-fail-nightly/from_form.rs:127:10
|
127 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:135:20
--> tests/ui-fail-nightly/from_form.rs:135:20
|
135 | #[field(name = "a&b")]
| ^^^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:133:10
--> tests/ui-fail-nightly/from_form.rs:133:10
|
133 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid form field name
--> $DIR/from_form.rs:141:20
--> tests/ui-fail-nightly/from_form.rs:141:20
|
141 | #[field(name = "a=")]
| ^^^^
|
= help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:139:10
--> tests/ui-fail-nightly/from_form.rs:139:10
|
139 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate attribute parameter: default
--> $DIR/from_form.rs:177:26
--> tests/ui-fail-nightly/from_form.rs:177:26
|
177 | #[field(default = 1, default = 2)]
| ^^^^^^^^^^^
|
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:175:10
--> tests/ui-fail-nightly/from_form.rs:175:10
|
175 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default field expression
--> $DIR/from_form.rs:184:23
--> tests/ui-fail-nightly/from_form.rs:184:23
|
184 | #[field(default = 2)]
| ^
|
= help: at most one `default` or `default_with` is allowed
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:181:10
--> tests/ui-fail-nightly/from_form.rs:181:10
|
181 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default expressions
--> $DIR/from_form.rs:190:23
--> tests/ui-fail-nightly/from_form.rs:190:23
|
190 | #[field(default = 1, default_with = None)]
| ^
|
= help: only one of `default` or `default_with` must be used
note: other default expression is here
--> $DIR/from_form.rs:190:41
--> tests/ui-fail-nightly/from_form.rs:190:41
|
190 | #[field(default = 1, default_with = None)]
| ^^^^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:188:10
--> tests/ui-fail-nightly/from_form.rs:188:10
|
188 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate default expressions
--> $DIR/from_form.rs:197:23
--> tests/ui-fail-nightly/from_form.rs:197:23
|
197 | #[field(default = 1)]
| ^
|
= help: only one of `default` or `default_with` must be used
note: other default expression is here
--> $DIR/from_form.rs:196:28
--> tests/ui-fail-nightly/from_form.rs:196:28
|
196 | #[field(default_with = None)]
| ^^^^
note: error occurred while deriving `FromForm`
--> $DIR/from_form.rs:194:10
--> tests/ui-fail-nightly/from_form.rs:194:10
|
194 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find function `unknown` in this scope
--> $DIR/from_form.rs:153:24
--> tests/ui-fail-nightly/from_form.rs:153:24
|
153 | #[field(validate = unknown())]
| ^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> $DIR/from_form.rs:147:24
--> tests/ui-fail-nightly/from_form.rs:147:24
|
147 | #[field(validate = 123)]
| -------- ^^^ expected enum `Result`, found integer
@ -446,7 +446,7 @@ error[E0308]: mismatched types
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/from_form.rs:160:12
--> tests/ui-fail-nightly/from_form.rs:160:12
|
160 | first: String,
| ^^^^^^ expected enum `TempFile`, found struct `std::string::String`
@ -455,7 +455,7 @@ error[E0308]: mismatched types
found reference `&std::string::String`
error[E0308]: mismatched types
--> $DIR/from_form.rs:166:12
--> tests/ui-fail-nightly/from_form.rs:166:12
|
166 | first: String,
| ^^^^^^ expected enum `TempFile`, found struct `std::string::String`
@ -464,13 +464,13 @@ error[E0308]: mismatched types
found reference `&std::string::String`
error[E0308]: mismatched types
--> $DIR/from_form.rs:165:28
--> tests/ui-fail-nightly/from_form.rs:165:28
|
165 | #[field(validate = ext("hello"))]
| ^^^^^^^ expected struct `ContentType`, found `&str`
error[E0277]: the trait bound `i32: From<&str>` is not satisfied
--> $DIR/from_form.rs:171:23
--> tests/ui-fail-nightly/from_form.rs:171:23
|
171 | #[field(default = "no conversion")]
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `i32`
@ -480,11 +480,11 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied
<i32 as From<bool>>
<i32 as From<i16>>
<i32 as From<i8>>
and 5 others
and 88 others
= note: required because of the requirements on the impl of `Into<i32>` for `&str`
error[E0308]: mismatched types
--> $DIR/from_form.rs:203:33
--> tests/ui-fail-nightly/from_form.rs:203:33
|
203 | #[field(default_with = Some("hi"))]
| ^^^^ expected struct `std::string::String`, found `&str`

View File

@ -1,31 +1,31 @@
error: tuple structs are not supported
--> $DIR/from_form_field.rs:4:1
--> tests/ui-fail-nightly/from_form_field.rs:4:1
|
4 | struct Foo1;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:3:10
--> tests/ui-fail-nightly/from_form_field.rs:3:10
|
3 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: tuple structs are not supported
--> $DIR/from_form_field.rs:7:1
--> tests/ui-fail-nightly/from_form_field.rs:7:1
|
7 | struct Foo2(usize);
| ^^^^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:6:10
--> tests/ui-fail-nightly/from_form_field.rs:6:10
|
6 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: named structs are not supported
--> $DIR/from_form_field.rs:10:1
--> tests/ui-fail-nightly/from_form_field.rs:10:1
|
10 | / struct Foo3 {
11 | | foo: usize,
@ -33,79 +33,79 @@ error: named structs are not supported
| |_^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:9:10
--> tests/ui-fail-nightly/from_form_field.rs:9:10
|
9 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: variants cannot have fields
--> $DIR/from_form_field.rs:16:6
--> tests/ui-fail-nightly/from_form_field.rs:16:6
|
16 | A(usize),
| ^^^^^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:14:10
--> tests/ui-fail-nightly/from_form_field.rs:14:10
|
14 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: enum must have at least one variant
--> $DIR/from_form_field.rs:20:1
--> tests/ui-fail-nightly/from_form_field.rs:20:1
|
20 | enum Foo5 { }
| ^^^^^^^^^^^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:19:10
--> tests/ui-fail-nightly/from_form_field.rs:19:10
|
19 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: type generics are not supported
--> $DIR/from_form_field.rs:23:11
--> tests/ui-fail-nightly/from_form_field.rs:23:11
|
23 | enum Foo6<T> {
| ^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:22:10
--> tests/ui-fail-nightly/from_form_field.rs:22:10
|
22 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: invalid value: expected string literal
--> $DIR/from_form_field.rs:29:21
--> tests/ui-fail-nightly/from_form_field.rs:29:21
|
29 | #[field(value = 123)]
| ^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:27:10
--> tests/ui-fail-nightly/from_form_field.rs:27:10
|
27 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected literal, found bare path "value"
--> $DIR/from_form_field.rs:35:13
--> tests/ui-fail-nightly/from_form_field.rs:35:13
|
35 | #[field(value)]
| ^^^^^
|
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:33:10
--> tests/ui-fail-nightly/from_form_field.rs:33:10
|
33 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: variant has conflicting values
--> $DIR/from_form_field.rs:41:5
--> tests/ui-fail-nightly/from_form_field.rs:41:5
|
41 | / #[field(value = "bar")]
42 | | #[field(value = "bar")]
@ -113,73 +113,73 @@ error: variant has conflicting values
| |_____^
|
note: this value...
--> $DIR/from_form_field.rs:41:21
--> tests/ui-fail-nightly/from_form_field.rs:41:21
|
41 | #[field(value = "bar")]
| ^^^^^
note: ...conflicts with this value
--> $DIR/from_form_field.rs:42:21
--> tests/ui-fail-nightly/from_form_field.rs:42:21
|
42 | #[field(value = "bar")]
| ^^^^^
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:39:10
--> tests/ui-fail-nightly/from_form_field.rs:39:10
|
39 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field value conflicts with previous value
--> $DIR/from_form_field.rs:50:21
--> tests/ui-fail-nightly/from_form_field.rs:50:21
|
50 | #[field(value = "BAr")]
| ^^^^^
|
help: ...declared in this variant
--> $DIR/from_form_field.rs:50:5
--> tests/ui-fail-nightly/from_form_field.rs:50:5
|
50 | / #[field(value = "BAr")]
51 | | B,
| |_____^
note: previous field with conflicting name
--> $DIR/from_form_field.rs:48:5
--> tests/ui-fail-nightly/from_form_field.rs:48:5
|
48 | / #[field(value = "bar")]
49 | | A,
| |_____^
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:46:10
--> tests/ui-fail-nightly/from_form_field.rs:46:10
|
46 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field value conflicts with previous value
--> $DIR/from_form_field.rs:57:21
--> tests/ui-fail-nightly/from_form_field.rs:57:21
|
57 | #[field(value = "a")]
| ^^^
|
help: ...declared in this variant
--> $DIR/from_form_field.rs:57:5
--> tests/ui-fail-nightly/from_form_field.rs:57:5
|
57 | / #[field(value = "a")]
58 | | B,
| |_____^
note: previous field with conflicting name
--> $DIR/from_form_field.rs:56:5
--> tests/ui-fail-nightly/from_form_field.rs:56:5
|
56 | A,
| ^
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:54:10
--> tests/ui-fail-nightly/from_form_field.rs:54:10
|
54 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: variant has conflicting values
--> $DIR/from_form_field.rs:80:5
--> tests/ui-fail-nightly/from_form_field.rs:80:5
|
80 | / #[field(value = "FoO")]
81 | | #[field(value = "foo")]
@ -187,24 +187,24 @@ error: variant has conflicting values
| |_____^
|
note: this value...
--> $DIR/from_form_field.rs:80:21
--> tests/ui-fail-nightly/from_form_field.rs:80:21
|
80 | #[field(value = "FoO")]
| ^^^^^
note: ...conflicts with this value
--> $DIR/from_form_field.rs:81:21
--> tests/ui-fail-nightly/from_form_field.rs:81:21
|
81 | #[field(value = "foo")]
| ^^^^^
note: error occurred while deriving `FromFormField`
--> $DIR/from_form_field.rs:78:10
--> tests/ui-fail-nightly/from_form_field.rs:78:10
|
78 | #[derive(FromFormField)]
| ^^^^^^^^^^^^^
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field has conflicting names
--> $DIR/from_form_field.rs:87:5
--> tests/ui-fail-nightly/from_form_field.rs:87:5
|
87 | / #[field(name = "foo")]
88 | | #[field(name = uncased("FOO"))]
@ -212,90 +212,90 @@ error: field has conflicting names
| |_________________^
|
note: this field name...
--> $DIR/from_form_field.rs:87:20
--> tests/ui-fail-nightly/from_form_field.rs:87:20
|
87 | #[field(name = "foo")]
| ^^^^^
note: ...conflicts with this field name
--> $DIR/from_form_field.rs:88:28
--> tests/ui-fail-nightly/from_form_field.rs:88:28
|
88 | #[field(name = uncased("FOO"))]
| ^^^^^
note: error occurred while deriving `FromForm`
--> $DIR/from_form_field.rs:85:10
--> tests/ui-fail-nightly/from_form_field.rs:85:10
|
85 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form_field.rs:96:20
--> tests/ui-fail-nightly/from_form_field.rs:96:20
|
96 | #[field(name = "foo")]
| ^^^^^
|
help: declared in this field
--> $DIR/from_form_field.rs:96:5
--> tests/ui-fail-nightly/from_form_field.rs:96:5
|
96 | / #[field(name = "foo")]
97 | | other: usize,
| |________________^
note: previous field with conflicting name
--> $DIR/from_form_field.rs:94:5
--> tests/ui-fail-nightly/from_form_field.rs:94:5
|
94 | / #[field(name = "foo")]
95 | | single: usize,
| |_________________^
note: error occurred while deriving `FromForm`
--> $DIR/from_form_field.rs:92:10
--> tests/ui-fail-nightly/from_form_field.rs:92:10
|
92 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form_field.rs:104:5
--> tests/ui-fail-nightly/from_form_field.rs:104:5
|
104 | hello_there: usize,
| ^^^^^^^^^^^
|
help: declared in this field
--> $DIR/from_form_field.rs:104:5
--> tests/ui-fail-nightly/from_form_field.rs:104:5
|
104 | hello_there: usize,
| ^^^^^^^^^^^^^^^^^^
note: previous field with conflicting name
--> $DIR/from_form_field.rs:102:5
--> tests/ui-fail-nightly/from_form_field.rs:102:5
|
102 | / #[field(name = uncased("HELLO_THERE"))]
103 | | single: usize,
| |_________________^
note: error occurred while deriving `FromForm`
--> $DIR/from_form_field.rs:100:10
--> tests/ui-fail-nightly/from_form_field.rs:100:10
|
100 | #[derive(FromForm)]
| ^^^^^^^^
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form_field.rs:111:5
--> tests/ui-fail-nightly/from_form_field.rs:111:5
|
111 | hello_there: usize,
| ^^^^^^^^^^^
|
help: declared in this field
--> $DIR/from_form_field.rs:111:5
--> tests/ui-fail-nightly/from_form_field.rs:111:5
|
111 | hello_there: usize,
| ^^^^^^^^^^^^^^^^^^
note: previous field with conflicting name
--> $DIR/from_form_field.rs:109:5
--> tests/ui-fail-nightly/from_form_field.rs:109:5
|
109 | / #[field(name = "hello_there")]
110 | | single: usize,
| |_________________^
note: error occurred while deriving `FromForm`
--> $DIR/from_form_field.rs:107:10
--> tests/ui-fail-nightly/from_form_field.rs:107:10
|
107 | #[derive(FromForm)]
| ^^^^^^^^

View File

@ -1,5 +1,5 @@
error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
--> $DIR/from_form_type_errors.rs:7:12
--> tests/ui-fail-nightly/from_form_type_errors.rs:7:12
|
7 | field: Unknown,
| ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown`
@ -7,7 +7,7 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied
= note: required because of the requirements on the impl of `FromForm<'r>` for `Unknown`
error[E0277]: the trait bound `Foo<usize>: FromFormField<'_>` is not satisfied
--> $DIR/from_form_type_errors.rs:14:12
--> tests/ui-fail-nightly/from_form_type_errors.rs:14:12
|
14 | field: Foo<usize>,
| ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo<usize>`

View File

@ -1,17 +1,11 @@
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:5:5
--> tests/ui-fail-nightly/responder-types.rs:5:5
|
5 | thing: u8,
| ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> $DIR/responder-types.rs:11:5
--> tests/ui-fail-nightly/responder-types.rs:11:5
|
11 | other: u8,
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
@ -23,21 +17,20 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `u8`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:16:5
--> tests/ui-fail-nightly/responder-types.rs:16:5
|
16 | thing: u8,
| ^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
note: required by `respond_to`
--> $DIR/responder.rs:298:5
|
298 | fn respond_to(self, request: &'r Request<'_>) -> response::Result<'o>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> $DIR/responder-types.rs:17:5
--> tests/ui-fail-nightly/responder-types.rs:17:5
|
17 | other: u8,
| ^^^^^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
@ -49,9 +42,14 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `u8`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not satisfied
--> $DIR/responder-types.rs:24:5
--> tests/ui-fail-nightly/responder-types.rs:24:5
|
24 | then: String,
| ^^^^^^^^^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`
@ -63,15 +61,20 @@ error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not sat
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `std::string::String`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:28:13
--> tests/ui-fail-nightly/responder-types.rs:28:13
|
28 | fn foo() -> usize { 0 }
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
note: required by `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`
--> $DIR/handler.rs:188:5
note: required by a bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`
--> $WORKSPACE/core/lib/src/route/handler.rs
|
188 | pub fn from<R: Responder<'r, 'o>>(req: &'r Request<'_>, responder: R) -> Outcome<'r> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| pub fn from<R: Responder<'r, 'o>>(req: &'r Request<'_>, responder: R) -> Outcome<'r> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`

View File

@ -1,141 +1,141 @@
error: need at least one field
--> $DIR/responder.rs:4:1
--> tests/ui-fail-nightly/responder.rs:4:1
|
4 | struct Thing1;
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:3:10
--> tests/ui-fail-nightly/responder.rs:3:10
|
3 | #[derive(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-nightly/responder.rs:7:14
|
7 | struct Thing2();
| ^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:6:10
--> tests/ui-fail-nightly/responder.rs:6:10
|
6 | #[derive(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-nightly/responder.rs:13:12
|
13 | enum Foo { Bark, }
| ^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:12:10
--> tests/ui-fail-nightly/responder.rs:12:10
|
12 | #[derive(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-nightly/responder.rs:16:14
|
16 | struct Thing4<'a, 'b>(&'a str, &'b str);
| ^^^^^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:15:10
--> tests/ui-fail-nightly/responder.rs:15:10
|
15 | #[derive(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-nightly/responder.rs:25:27
|
25 | #[response(content_type = "")]
| ^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:24:10
--> tests/ui-fail-nightly/responder.rs:24:10
|
24 | #[derive(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-nightly/responder.rs:29:27
|
29 | #[response(content_type = "idk")]
| ^^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:28:10
--> tests/ui-fail-nightly/responder.rs:28:10
|
28 | #[derive(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-nightly/responder.rs:33:27
|
33 | #[response(content_type = 100)]
| ^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:32:10
--> tests/ui-fail-nightly/responder.rs:32:10
|
32 | #[derive(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-nightly/responder.rs:37:21
|
37 | #[response(status = 8)]
| ^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:36:10
--> tests/ui-fail-nightly/responder.rs:36:10
|
36 | #[derive(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-nightly/responder.rs:41:21
|
41 | #[response(status = "404")]
| ^^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:40:10
--> tests/ui-fail-nightly/responder.rs:40:10
|
40 | #[derive(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-nightly/responder.rs:45:21
|
45 | #[response(status = "404", content_type = "html")]
| ^^^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:44:10
--> tests/ui-fail-nightly/responder.rs:44:10
|
44 | #[derive(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-nightly/responder.rs:49:41
|
49 | #[response(status = 404, content_type = 120)]
| ^^^
|
note: error occurred while deriving `Responder`
--> $DIR/responder.rs:48:10
--> tests/ui-fail-nightly/responder.rs:48:10
|
48 | #[derive(Responder)]
| ^^^^^^^^^

View File

@ -1,5 +1,5 @@
error: missing expected parameter: `uri`
--> $DIR/route-attribute-general-syntax.rs:4:1
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:4:1
|
4 | #[get()]
| ^^^^^^^^
@ -7,7 +7,7 @@ error: missing expected parameter: `uri`
= note: this error originates in the attribute macro `get` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:9:1
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:9:1
|
9 | struct S;
| ^^^^^^
@ -15,7 +15,7 @@ error: expected `fn`
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:12:1
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:12:1
|
12 | enum A { }
| ^^^^
@ -23,7 +23,7 @@ error: expected `fn`
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:15:1
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:15:1
|
15 | trait Foo { }
| ^^^^^
@ -31,7 +31,7 @@ error: expected `fn`
= help: #[get] can only be used on functions
error: expected `fn`
--> $DIR/route-attribute-general-syntax.rs:18:1
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:18:1
|
18 | impl S { }
| ^^^^
@ -39,37 +39,37 @@ error: expected `fn`
= help: #[get] can only be used on functions
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:21:12
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:21:12
|
21 | #[get("/", 123)]
| ^^^
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:24:12
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:24:12
|
24 | #[get("/", "/")]
| ^^^
error: unexpected keyed parameter: expected literal or identifier
--> $DIR/route-attribute-general-syntax.rs:27:7
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:27:7
|
27 | #[get(data = "<foo>", "/")]
| ^^^^^^^^^^^^^^
error: unexpected attribute parameter: `unknown`
--> $DIR/route-attribute-general-syntax.rs:30:12
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:30:12
|
30 | #[get("/", unknown = "foo")]
| ^^^^^^^^^^^^^^^
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:33:12
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:33:12
|
33 | #[get("/", ...)]
| ^^^
error: handler arguments must be named
--> $DIR/route-attribute-general-syntax.rs:39:7
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:39:7
|
39 | fn c1(_: usize) {}
| ^^^^^^^^
@ -77,103 +77,103 @@ error: handler arguments must be named
= help: to name an ignored handler argument, use `_name`
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:43:7
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:43:7
|
43 | #[get(100)]
| ^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:46:7
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:46:7
|
46 | #[get('/')]
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:49:19
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:49:19
|
49 | #[get("/", rank = "1")]
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:52:19
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:52:19
|
52 | #[get("/", rank = '1')]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:57:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:57:21
|
57 | #[get("/", format = "applicationx-custom")]
| ^^^^^^^^^^^^^^^^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:60:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:60:21
|
60 | #[get("/", format = "")]
| ^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:63:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:63:21
|
63 | #[get("/", format = "//")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:66:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:66:21
|
66 | #[get("/", format = "/")]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:69:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:69:21
|
69 | #[get("/", format = "a/")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:72:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:72:21
|
72 | #[get("/", format = "/a")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:75:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:75:21
|
75 | #[get("/", format = "/a/")]
| ^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:78:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:78:21
|
78 | #[get("/", format = "a/b/")]
| ^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:81:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:81:21
|
81 | #[get("/", format = "unknown")]
| ^^^^^^^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:84:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:84:21
|
84 | #[get("/", format = 12)]
| ^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:87:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:87:21
|
87 | #[get("/", format = 'j')]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:90:21
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:90:21
|
90 | #[get("/", format = "text//foo")]
| ^^^^^^^^^^^
error: invalid HTTP method for route handlers
--> $DIR/route-attribute-general-syntax.rs:95:9
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:95:9
|
95 | #[route(CONNECT, "/")]
| ^^^^^^^
@ -181,7 +181,7 @@ error: invalid HTTP method for route handlers
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: invalid HTTP method
--> $DIR/route-attribute-general-syntax.rs:98:9
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:98:9
|
98 | #[route(FIX, "/")]
| ^^^
@ -189,7 +189,7 @@ error: invalid HTTP method
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal
--> $DIR/route-attribute-general-syntax.rs:101:9
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:101:9
|
101 | #[route("hi", "/")]
| ^^^^
@ -197,7 +197,7 @@ error: expected identifier, found string literal
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found string literal
--> $DIR/route-attribute-general-syntax.rs:104:9
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:104:9
|
104 | #[route("GET", "/")]
| ^^^^^
@ -205,7 +205,7 @@ error: expected identifier, found string literal
= help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
error: expected identifier, found integer literal
--> $DIR/route-attribute-general-syntax.rs:107:9
--> tests/ui-fail-nightly/route-attribute-general-syntax.rs:107:9
|
107 | #[route(120, "/")]
| ^^^

View File

@ -1,5 +1,5 @@
error: invalid route URI: expected token '/' but found 'a' at index 0
--> $DIR/route-path-bad-syntax.rs:5:8
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:5:8
|
5 | #[get("a")]
| ^
@ -7,7 +7,7 @@ error: invalid route URI: expected token '/' but found 'a' at index 0
= help: expected URI in origin form: "/path/<param>"
error: invalid route URI: unexpected EOF: expected token '/' at index 0
--> $DIR/route-path-bad-syntax.rs:8:8
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:8:8
|
8 | #[get("")]
| ^
@ -15,7 +15,7 @@ error: invalid route URI: unexpected EOF: expected token '/' at index 0
= help: expected URI in origin form: "/path/<param>"
error: invalid route URI: expected token '/' but found 'a' at index 0
--> $DIR/route-path-bad-syntax.rs:11:8
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:11:8
|
11 | #[get("a/b/c")]
| ^
@ -23,7 +23,7 @@ error: invalid route URI: expected token '/' but found 'a' at index 0
= help: expected URI in origin form: "/path/<param>"
error: route URIs cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:14:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:14:10
|
14 | #[get("/a///b")]
| ^^
@ -31,7 +31,7 @@ error: route URIs cannot contain empty segments
= note: expected "/a/b", found "/a///b"
error: route URIs cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:17:13
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:17:13
|
17 | #[get("/?bat&&")]
| ^^
@ -39,7 +39,7 @@ error: route URIs cannot contain empty segments
= note: expected "/?bat", found "/?bat&&"
error: route URIs cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:20:13
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:20:13
|
20 | #[get("/?bat&&")]
| ^^
@ -47,7 +47,7 @@ error: route URIs cannot contain empty segments
= note: expected "/?bat", found "/?bat&&"
error: route URIs cannot contain empty segments
--> $DIR/route-path-bad-syntax.rs:23:12
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:23:12
|
23 | #[get("/a/b//")]
| ^^
@ -55,79 +55,79 @@ error: route URIs cannot contain empty segments
= note: expected "/a/b", found "/a/b//"
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:42:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:42:10
|
42 | #[get("/<name>")]
| ^^^^
|
note: expected argument named `name` here
--> $DIR/route-path-bad-syntax.rs:43:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:43:6
|
43 | fn h0(_name: usize) {}
| ^^^^^^^^^^^^^^
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:45:12
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:45:12
|
45 | #[get("/a?<r>")]
| ^
|
note: expected argument named `r` here
--> $DIR/route-path-bad-syntax.rs:46:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:46:6
|
46 | fn h1() {}
| ^^
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:48:23
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:48:23
|
48 | #[post("/a", data = "<test>")]
| ^^^^
|
note: expected argument named `test` here
--> $DIR/route-path-bad-syntax.rs:49:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:49:6
|
49 | fn h2() {}
| ^^
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:51:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:51:10
|
51 | #[get("/<_r>")]
| ^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:52:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:52:6
|
52 | fn h3() {}
| ^^
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:54:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:54:10
|
54 | #[get("/<_r>/<b>")]
| ^^
|
note: expected argument named `_r` here
--> $DIR/route-path-bad-syntax.rs:55:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:55:6
|
55 | fn h4() {}
| ^^
error: unused parameter
--> $DIR/route-path-bad-syntax.rs:54:15
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:54:15
|
54 | #[get("/<_r>/<b>")]
| ^
|
note: expected argument named `b` here
--> $DIR/route-path-bad-syntax.rs:55:6
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:55:6
|
55 | fn h4() {}
| ^^
error: invalid identifier: `foo_.`
--> $DIR/route-path-bad-syntax.rs:60:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:60:10
|
60 | #[get("/<foo_.>")]
| ^^^^^
@ -136,7 +136,7 @@ error: invalid identifier: `foo_.`
= help: did you mean `<foo_>`?
error: invalid identifier: `foo*`
--> $DIR/route-path-bad-syntax.rs:63:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:63:10
|
63 | #[get("/<foo*>")]
| ^^^^
@ -145,7 +145,7 @@ error: invalid identifier: `foo*`
= help: did you mean `<foo>`?
error: invalid identifier: `!`
--> $DIR/route-path-bad-syntax.rs:66:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:66:10
|
66 | #[get("/<!>")]
| ^
@ -154,7 +154,7 @@ error: invalid identifier: `!`
= help: did you mean `<param>`?
error: invalid identifier: `name>:<id`
--> $DIR/route-path-bad-syntax.rs:69:10
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:69:10
|
69 | #[get("/<name>:<id>")]
| ^^^^^^^^^
@ -163,7 +163,7 @@ error: invalid identifier: `name>:<id`
= help: did you mean `<nameid>`?
error: unexpected static parameter
--> $DIR/route-path-bad-syntax.rs:74:20
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:74:20
|
74 | #[get("/", data = "foo")]
| ^^^
@ -171,7 +171,7 @@ error: unexpected static parameter
= help: parameter must be dynamic: `<foo>`
error: parameter cannot be trailing
--> $DIR/route-path-bad-syntax.rs:77:20
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:77:20
|
77 | #[get("/", data = "<foo..>")]
| ^^^^^^^
@ -179,7 +179,7 @@ error: parameter cannot be trailing
= help: did you mean `<foo>`?
warning: `segment` starts with `<` but does not end with `>`
--> $DIR/route-path-bad-syntax.rs:80:20
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:80:20
|
80 | #[get("/", data = "<foo")]
| ^^^^
@ -187,7 +187,7 @@ warning: `segment` starts with `<` but does not end with `>`
= help: perhaps you meant the dynamic parameter `<foo>`?
error: unexpected static parameter
--> $DIR/route-path-bad-syntax.rs:80:20
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:80:20
|
80 | #[get("/", data = "<foo")]
| ^^^^
@ -195,7 +195,7 @@ error: unexpected static parameter
= help: parameter must be dynamic: `<foo>`
error: invalid identifier: `test `
--> $DIR/route-path-bad-syntax.rs:83:21
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:83:21
|
83 | #[get("/", data = "<test >")]
| ^^^^^
@ -204,7 +204,7 @@ error: invalid identifier: `test `
= help: did you mean `<test>`?
error: handler arguments must be named
--> $DIR/route-path-bad-syntax.rs:89:7
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:89:7
|
89 | fn k0(_: usize) {}
| ^^^^^^^^
@ -212,13 +212,13 @@ error: handler arguments must be named
= help: to name an ignored handler argument, use `_name`
error: parameters cannot be empty
--> $DIR/route-path-bad-syntax.rs:93:9
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:93:9
|
93 | #[get("/<>")]
| ^^
warning: `segment` starts with `<` but does not end with `>`
--> $DIR/route-path-bad-syntax.rs:96:9
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:96:9
|
96 | #[get("/<id><")]
| ^^^^^
@ -226,7 +226,7 @@ warning: `segment` starts with `<` but does not end with `>`
= help: perhaps you meant the dynamic parameter `<id>`?
warning: `segment` starts with `<` but does not end with `>`
--> $DIR/route-path-bad-syntax.rs:99:9
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:99:9
|
99 | #[get("/<<<<id><")]
| ^^^^^^^^
@ -234,7 +234,7 @@ warning: `segment` starts with `<` but does not end with `>`
= help: perhaps you meant the dynamic parameter `<id>`?
warning: `segment` starts with `<` but does not end with `>`
--> $DIR/route-path-bad-syntax.rs:102:9
--> tests/ui-fail-nightly/route-path-bad-syntax.rs:102:9
|
102 | #[get("/<>name><")]
| ^^^^^^^^

View File

@ -1,29 +1,17 @@
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:6:12
--> tests/ui-fail-nightly/route-type-errors.rs:6:12
|
6 | fn f0(foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
note: required by `from_param`
--> $DIR/from_param.rs:183:5
|
183 | fn from_param(param: &'a str) -> Result<Self, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
--> $DIR/route-type-errors.rs:9:12
--> tests/ui-fail-nightly/route-type-errors.rs:9:12
|
9 | fn f1(foo: Q) {}
| ^ the trait `FromSegments<'_>` is not implemented for `Q`
|
note: required by `from_segments`
--> $DIR/from_param.rs:291:5
|
291 | fn from_segments(segments: Segments<'r, Path>) -> Result<Self, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> $DIR/route-type-errors.rs:12:12
--> tests/ui-fail-nightly/route-type-errors.rs:12:12
|
12 | fn f2(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
@ -31,7 +19,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required because of the requirements on the impl of `FromForm<'_>` for `Q`
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> $DIR/route-type-errors.rs:15:12
--> tests/ui-fail-nightly/route-type-errors.rs:15:12
|
15 | fn f3(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
@ -39,73 +27,37 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required because of the requirements on the impl of `FromForm<'_>` for `Q`
error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied
--> $DIR/route-type-errors.rs:18:12
--> tests/ui-fail-nightly/route-type-errors.rs:18:12
|
18 | fn f4(foo: Q) {}
| ^ the trait `FromData<'_>` is not implemented for `Q`
|
note: required by a bound in `rocket::data::FromData::from_data`
--> $DIR/from_data.rs:194:41
|
194 | async fn from_data(req: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self>;
| ^^ required by this bound in `rocket::data::FromData::from_data`
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> $DIR/route-type-errors.rs:21:10
--> tests/ui-fail-nightly/route-type-errors.rs:21:10
|
21 | fn f5(a: Q, foo: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
note: required by a bound in `from_request`
--> $DIR/from_request.rs:388:48
|
388 | async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error>;
| ^^ required by this bound in `from_request`
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:21:18
--> tests/ui-fail-nightly/route-type-errors.rs:21:18
|
21 | fn f5(a: Q, foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
note: required by `from_param`
--> $DIR/from_param.rs:183:5
|
183 | fn from_param(param: &'a str) -> Result<Self, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:10
--> tests/ui-fail-nightly/route-type-errors.rs:24:10
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
note: required by a bound in `from_request`
--> $DIR/from_request.rs:388:48
|
388 | async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error>;
| ^^ required by this bound in `from_request`
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:18
--> tests/ui-fail-nightly/route-type-errors.rs:24:18
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
note: required by `from_param`
--> $DIR/from_param.rs:183:5
|
183 | fn from_param(param: &'a str) -> Result<Self, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:39
--> 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`
|
note: required by `from_param`
--> $DIR/from_param.rs:183:5
|
183 | fn from_param(param: &'a str) -> Result<Self, Self::Error>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,49 +1,49 @@
warning: 'application/x-custom' is not a known media type
--> $DIR/route-warnings.rs:7:21
--> tests/ui-fail-nightly/route-warnings.rs:7:21
|
7 | #[get("/", format = "application/x-custom")]
| ^^^^^^^^^^^^^^^^^^^^^^
warning: 'x-custom/plain' is not a known media type
--> $DIR/route-warnings.rs:10:21
--> tests/ui-fail-nightly/route-warnings.rs:10:21
|
10 | #[get("/", format = "x-custom/plain")]
| ^^^^^^^^^^^^^^^^
warning: 'x-custom/x-custom' is not a known media type
--> $DIR/route-warnings.rs:13:21
--> tests/ui-fail-nightly/route-warnings.rs:13:21
|
13 | #[get("/", format = "x-custom/x-custom")]
| ^^^^^^^^^^^^^^^^^^^
warning: `data` used with non-payload-supporting method
--> $DIR/route-warnings.rs:18:12
--> tests/ui-fail-nightly/route-warnings.rs:18:12
|
18 | #[get("/", data = "<_foo>")]
| ^^^^^^^^^^^^^^^
|
note: 'GET' does not typically support payloads
--> $DIR/route-warnings.rs:18:3
--> 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)
warning: `data` used with non-payload-supporting method
--> $DIR/route-warnings.rs:21:13
--> tests/ui-fail-nightly/route-warnings.rs:21:13
|
21 | #[head("/", data = "<_foo>")]
| ^^^^^^^^^^^^^^^
|
note: 'HEAD' does not typically support payloads
--> $DIR/route-warnings.rs:21:3
--> 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)
error: checking for warnings!
--> $DIR/route-warnings.rs:25:5
--> tests/ui-fail-nightly/route-warnings.rs:25:5
|
25 | compile_error!("checking for warnings!")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,17 +1,17 @@
error: expected `,`
--> $DIR/routes.rs:4:23
--> tests/ui-fail-nightly/routes.rs:4:23
|
4 | let _ = routes![a b];
| ^
error: expected identifier
--> $DIR/routes.rs:6:24
--> tests/ui-fail-nightly/routes.rs:6:24
|
6 | let _ = routes![a::, ];
| ^
error: unexpected end of input, expected identifier
--> $DIR/routes.rs:7:13
--> tests/ui-fail-nightly/routes.rs:7:13
|
7 | let _ = routes![a::];
| ^^^^^^^^^^^^

View File

@ -1,11 +1,5 @@
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:45:22
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:45:22
|
45 | uri!(simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -14,14 +8,11 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:47:17
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:17
|
47 | uri!(simple("hello"));
| ^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -30,14 +21,11 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:49:22
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:22
|
49 | uri!(simple(id = 239239i64));
| ^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
@ -46,26 +34,17 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:51:30
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:30
|
51 | uri!(not_uri_display(10, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
|
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:56:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:56: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`
@ -74,15 +53,12 @@ error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, s
<i32 as FromUriParam<P, &'x i32>>
<i32 as FromUriParam<P, &'x mut i32>>
<i32 as FromUriParam<P, i32>>
<f32 as FromUriParam<P, &'x f32>>
and 38 others
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` for `std::option::Option<i32>`
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:56:42
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:42
|
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`
@ -92,16 +68,11 @@ 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>>
<std::string::String as FromUriParam<P, &'x mut std::string::String>>
and 2 others
and 8 others
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` for `Result<std::string::String, &str>`
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:58:19
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:19
|
58 | uri!(simple_q("hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
@ -110,14 +81,11 @@ error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:60:24
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:24
|
60 | uri!(simple_q(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
@ -126,74 +94,53 @@ error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:62:23
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:23
|
62 | uri!(other_q(100, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:64:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:25
|
64 | uri!(other_q(rest = S, id = 100));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:66:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25
|
66 | uri!(other_q(rest = _, id = 100));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `S`
|
note: required by a bound in `assert_ignorable`
--> $DIR/uri_display.rs:544:37
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
544 | pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `usize: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:68:33
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:33
|
68 | uri!(other_q(rest = S, id = _));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `usize`
|
note: required by a bound in `assert_ignorable`
--> $DIR/uri_display.rs:544:37
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
544 | pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| ^^^^^^^^^^^^ required by this bound in `assert_ignorable`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:68:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25
|
68 | uri!(other_q(rest = S, id = _));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:77:40
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:40
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -202,20 +149,26 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied
--> $DIR/typed-uri-bad-type.rs:77:15
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn with_prefix<P: ValidRoutePrefix>(self, p: P) -> PrefixedRouteUri<P::Output> {
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:78:33
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:33
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -224,20 +177,26 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied
--> $DIR/typed-uri-bad-type.rs:78:15
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| -----^^^-
| | |
| | the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn with_prefix<P: ValidRoutePrefix>(self, p: P) -> PrefixedRouteUri<P::Output> {
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:81:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:25
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -246,20 +205,26 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:81:37
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| -----^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| 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
--> $DIR/typed-uri-bad-type.rs:82:25
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:25
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -268,14 +233,26 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
note: required by `from_uri_param`
--> $DIR/from_uri_param.rs:192:5
|
192 | fn from_uri_param(param: T) -> Self::Target;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<f32 as FromUriParam<P, &'x f32>>
and 38 others
error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:82:37
--> tests/ui-fail-nightly/typed-uri-bad-type.rs:82: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<'_>`
| -----^^^^^^^^^^-
| | |
| | the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Origin<'_>`
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| where S: ValidRouteSuffix<Origin<'static>>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0271]: type mismatch resolving `<std::string::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 enum `Infallible`, found `&str`

View File

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

View File

@ -1,151 +1,151 @@
error: expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:10:28
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:10:28
|
10 | uri!(simple: id = 100, "Hello");
| ^^^^^^^
error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:11:17
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:11:17
|
11 | uri!(simple(id = 100, "Hello"));
| ^^^^^^^^^^^^^^^^^
error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:12:17
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:12:17
|
12 | uri!(simple("Hello", id = 100));
| ^^^^^^^^^^^^^^^^^
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:14:16
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:14:16
|
14 | uri!(simple:);
| ^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:16:16
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:16:16
|
16 | uri!("mount", simple);
| ^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:17:16
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:17:16
|
17 | uri!("mount", simple, "http://");
| ^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:18:28
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:18:28
|
18 | uri!("/mount", simple, "http://");
| ^^^^^^^^^
error: expected 1, 2, or 3 arguments, found 4
--> $DIR/typed-uris-invalid-syntax.rs:19:36
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:19:36
|
19 | uri!("/mount", simple, "#foo", "?foo");
| ^^^^^^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:20:16
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:20:16
|
20 | uri!("mount", simple(10, "hi"), "http://");
| ^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:21:38
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:21:38
|
21 | uri!("/mount", simple(10, "hi"), "http://");
| ^^^^^^^^^
error: URI prefix cannot contain query part
--> $DIR/typed-uris-invalid-syntax.rs:22:10
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:22:10
|
22 | uri!("/mount?foo", simple(10, "hi"), "foo/bar?foo#bar");
| ^^^^^^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:23:38
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:23:38
|
23 | uri!("/mount", simple(10, "hi"), "a/b");
| ^^^^^
error: expected 1, 2, or 3 arguments, found 4
--> $DIR/typed-uris-invalid-syntax.rs:24:46
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:24:46
|
24 | uri!("/mount", simple(10, "hi"), "#foo", "?foo");
| ^^^^^^
error: invalid URI: unexpected token '<' at index 7
--> $DIR/typed-uris-invalid-syntax.rs:25:18
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:25:18
|
25 | uri!("/mount/<id>", simple);
| ^
error: expected at least 1 argument, found none
--> $DIR/typed-uris-invalid-syntax.rs:26:5
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:26:5
|
26 | uri!();
| ^^^^^^^
| ^^^^^^
|
= note: this error originates in the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:27:16
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:27:16
|
27 | uri!(simple: id = );
| ^
error: unexpected end of input, expected expression
--> $DIR/typed-uris-invalid-syntax.rs:28:22
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:28:22
|
28 | uri!(simple(id = ));
| ^
error: invalid URI: unexpected EOF: expected some token at index 0
--> $DIR/typed-uris-invalid-syntax.rs:29:11
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:29:11
|
29 | uri!("*", simple(10), "hi");
| ^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:30:40
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:30:40
|
30 | uri!("some.host:8088", simple(10), "hi");
| ^^^^
error: expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:33:18
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:33:18
|
33 | uri!("/foo", "bar");
| ^^^^^
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:34:17
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:34:17
|
34 | uri!("/foo" ("bar"));
| ^^^^^^^
error: URI prefix cannot contain query part
--> $DIR/typed-uris-invalid-syntax.rs:35:10
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:35:10
|
35 | uri!("ftp:?", index);
| ^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:36:25
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:36:25
|
36 | uri!("ftp:", index, "foo#bar");
| ^^^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:37:25
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:37:25
|
37 | uri!("ftp:", index, "foo?bar");
| ^^^^^^^^^
error: route expects 2 parameters but 0 were supplied
--> $DIR/typed-uris-invalid-syntax.rs:13:10
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:13:10
|
13 | uri!(simple,);
| ^^^^^^

View File

@ -1,109 +1,109 @@
error: fieldless structs are not supported
--> $DIR/uri_display.rs:4:1
--> tests/ui-fail-nightly/uri_display.rs:4:1
|
4 | struct Foo1;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:3:10
--> tests/ui-fail-nightly/uri_display.rs:3:10
|
3 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:7:1
|
7 | struct Foo2();
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:6:10
--> tests/ui-fail-nightly/uri_display.rs:6:10
|
6 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:10:11
|
10 | enum Foo3 { }
| ^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:9:10
--> tests/ui-fail-nightly/uri_display.rs:9:10
|
9 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:18:12
|
18 | struct Foo5(String, String);
| ^^^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:17:10
--> tests/ui-fail-nightly/uri_display.rs:17:10
|
17 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:22:20
|
22 | #[field(name = 123)]
| ^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:20:10
--> tests/ui-fail-nightly/uri_display.rs:20:10
|
20 | #[derive(UriDisplayQuery)]
| ^^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:27:12
|
27 | struct Foo7(String, usize);
| ^^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:26:10
--> tests/ui-fail-nightly/uri_display.rs:26:10
|
26 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:30:1
|
30 | struct Foo8;
| ^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:29:10
--> tests/ui-fail-nightly/uri_display.rs:29:10
|
29 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:33:1
|
33 | enum Foo9 { }
| ^^^^^^^^^^^^^^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:32:10
--> tests/ui-fail-nightly/uri_display.rs:32:10
|
32 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^
= 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-nightly/uri_display.rs:36:1
|
36 | / struct Foo10 {
37 | | named: usize
@ -111,7 +111,7 @@ error: named structs are not supported
| |_^
|
note: error occurred while deriving `UriDisplay`
--> $DIR/uri_display.rs:35:10
--> tests/ui-fail-nightly/uri_display.rs:35:10
|
35 | #[derive(UriDisplayPath)]
| ^^^^^^^^^^^^^^

View File

@ -1,61 +1,96 @@
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:6:13
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:10:5
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:16:5
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:21:11
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:27:9
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:35:9
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Path>` is not satisfied
--> $DIR/uri_display_type_errors.rs:40:12
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Path>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`

View File

@ -1,5 +1,5 @@
error: attribute can only be applied to `async` functions
--> $DIR/async-entry.rs:4:5
--> tests/ui-fail-stable/async-entry.rs:4:5
|
4 | #[rocket::main]
| ^^^^^^^^^^^^^^^
@ -7,13 +7,13 @@ error: attribute can only be applied to `async` functions
= note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function must be `async`
--> $DIR/async-entry.rs:5:5
--> tests/ui-fail-stable/async-entry.rs:5:5
|
5 | fn foo() { }
| ^^
error: attribute can only be applied to `async` functions
--> $DIR/async-entry.rs:16:5
--> tests/ui-fail-stable/async-entry.rs:16:5
|
16 | #[rocket::main]
| ^^^^^^^^^^^^^^^
@ -21,14 +21,14 @@ error: attribute can only be applied to `async` functions
= note: this error originates in the attribute macro `rocket::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function must be `async`
--> $DIR/async-entry.rs:17:5
--> 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
--> $DIR/async-entry.rs:49:5
--> tests/ui-fail-stable/async-entry.rs:49:5
|
49 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
@ -36,13 +36,13 @@ error: attribute cannot be applied to `main` function
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function cannot be `main`
--> $DIR/async-entry.rs:50:8
--> tests/ui-fail-stable/async-entry.rs:50:8
|
50 | fn main() -> rocekt::Rocket<rocket::Build> {
| ^^^^
error: attribute can only be applied to functions that return a value
--> $DIR/async-entry.rs:56:5
--> tests/ui-fail-stable/async-entry.rs:56:5
|
56 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
@ -50,13 +50,13 @@ error: attribute can only be applied to functions that return a value
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function must return a value
--> $DIR/async-entry.rs:57:5
--> 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
--> $DIR/async-entry.rs:64:5
--> tests/ui-fail-stable/async-entry.rs:64:5
|
64 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
@ -64,14 +64,14 @@ error: attribute can only be applied to functions that return a value
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function must return a value
--> $DIR/async-entry.rs:65:5
--> 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
--> $DIR/async-entry.rs:79:5
--> tests/ui-fail-stable/async-entry.rs:79:5
|
79 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
@ -79,14 +79,14 @@ error: attribute cannot be applied to `main` function
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function cannot be `main`
--> $DIR/async-entry.rs:80:8
--> tests/ui-fail-stable/async-entry.rs:80:8
|
80 | fn main() -> &'static str {
| ^^^^
error: attribute cannot be applied to `main` function
--- note: this attribute generates a `main` function
--> $DIR/async-entry.rs:87:5
--> tests/ui-fail-stable/async-entry.rs:87:5
|
87 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
@ -94,13 +94,13 @@ error: attribute cannot be applied to `main` function
= note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info)
error: [note] this function cannot be `main`
--> $DIR/async-entry.rs:88:14
--> tests/ui-fail-stable/async-entry.rs:88:14
|
88 | async fn main() -> _ {
| ^^^^
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/async-entry.rs:73:17
--> tests/ui-fail-stable/async-entry.rs:73:17
|
72 | fn rocket() -> _ {
| ------ this is not `async`
@ -108,7 +108,7 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
error[E0308]: mismatched types
--> $DIR/async-entry.rs:35:9
--> tests/ui-fail-stable/async-entry.rs:35:9
|
35 | rocket::build()
| ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket`
@ -117,7 +117,7 @@ error[E0308]: mismatched types
found struct `Rocket<Build>`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:44:9
--> tests/ui-fail-stable/async-entry.rs:44:9
|
44 | "hi".to_string()
| ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String`
@ -126,7 +126,7 @@ error[E0308]: mismatched types
found struct `std::string::String`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:24:21
--> tests/ui-fail-stable/async-entry.rs:24:21
|
24 | async fn main() {
| ^ expected `()` because of default return type
@ -142,7 +142,7 @@ error[E0308]: mismatched types
found struct `Rocket<Build>`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:33:26
--> tests/ui-fail-stable/async-entry.rs:33:26
|
33 | async fn rocket() -> String {
| ^^^^^^
@ -154,7 +154,7 @@ error[E0308]: mismatched types
found struct `std::string::String`
error[E0277]: `main` has invalid return type `Rocket<Build>`
--> $DIR/async-entry.rs:94:20
--> tests/ui-fail-stable/async-entry.rs:94:20
|
94 | async fn main() -> rocket::Rocket<rocket::Build> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`

View File

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

View File

@ -1,67 +1,67 @@
error: expected `fn`
--- help: `#[catch]` can only be used on functions
--> $DIR/catch.rs:6:1
--> tests/ui-fail-stable/catch.rs:6:1
|
6 | struct Catcher(String);
| ^^^^^^
error: expected `fn`
--- help: `#[catch]` can only be used on functions
--> $DIR/catch.rs:9:7
--> tests/ui-fail-stable/catch.rs:9:7
|
9 | const CATCH: &str = "Catcher";
| ^^^^^
error: expected integer or `default`, found string literal
--- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
--> $DIR/catch.rs:11:9
--> tests/ui-fail-stable/catch.rs:11:9
|
11 | #[catch("404")]
| ^^^^^
error: unexpected keyed parameter: expected literal or identifier
--- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
--> $DIR/catch.rs:14:9
--> 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)]`
--> $DIR/catch.rs:17:9
--> 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)]`
--> $DIR/catch.rs:20:9
--> tests/ui-fail-stable/catch.rs:20:9
|
20 | #[catch(99)]
| ^^
error: status must be in range [100, 599]
--- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
--> $DIR/catch.rs:23:9
--> tests/ui-fail-stable/catch.rs:23:9
|
23 | #[catch(600)]
| ^^^
error: unexpected attribute parameter: `message`
--- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]`
--> $DIR/catch.rs:26:14
--> tests/ui-fail-stable/catch.rs:26:14
|
26 | #[catch(400, message = "foo")]
| ^^^^^^^
error[E0308]: mismatched types
--> $DIR/catch.rs:30:17
--> tests/ui-fail-stable/catch.rs:30:17
|
30 | fn f3(_request: &Request, other: bool) { }
| ^ expected `&rocket::Request<'_>`, found struct `Status`
error[E0308]: mismatched types
--> $DIR/catch.rs:30:34
--> tests/ui-fail-stable/catch.rs:30:34
|
30 | fn f3(_request: &Request, other: bool) { }
| ^^^^ expected `bool`, found `&rocket::Request<'_>`

View File

@ -1,37 +1,37 @@
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:6:30
--> tests/ui-fail-stable/catch_type_errors.rs:6:30
|
5 | #[catch(404)]
| ------------- required by a bound introduced by this call
6 | fn f1(_request: &Request) -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= note: required by `respond_to`
error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:11:30
--> tests/ui-fail-stable/catch_type_errors.rs:11:30
|
10 | #[catch(404)]
| ------------- required by a bound introduced by this call
11 | fn f2(_request: &Request) -> bool {
| ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool`
|
= note: required by `respond_to`
error[E0308]: mismatched types
--> $DIR/catch_type_errors.rs:16:17
--> tests/ui-fail-stable/catch_type_errors.rs:16:17
|
16 | fn f3(_request: bool) -> usize {
| ^^^^ expected `bool`, found `&rocket::Request<'_>`
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:16:26
--> tests/ui-fail-stable/catch_type_errors.rs:16:26
|
15 | #[catch(404)]
| ------------- required by a bound introduced by this call
16 | fn f3(_request: bool) -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= note: required by `respond_to`
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/catch_type_errors.rs:21:12
--> tests/ui-fail-stable/catch_type_errors.rs:21:12
|
20 | #[catch(404)]
| ------------- required by a bound introduced by this call
21 | fn f4() -> usize {
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= note: required by `respond_to`

View File

@ -1,11 +1,11 @@
error: enums are not supported
--> $DIR/from_form.rs:4:1
--> tests/ui-fail-stable/from_form.rs:4:1
|
4 | enum Thing { }
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:3:10
--> tests/ui-fail-stable/from_form.rs:3:10
|
3 | #[derive(FromForm)]
| ^^^^^^^^
@ -13,13 +13,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> $DIR/from_form.rs:7:1
--> tests/ui-fail-stable/from_form.rs:7:1
|
7 | struct Foo1;
| ^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:6:10
--> tests/ui-fail-stable/from_form.rs:6:10
|
6 | #[derive(FromForm)]
| ^^^^^^^^
@ -27,13 +27,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: at least one field is required
--> $DIR/from_form.rs:10:13
--> tests/ui-fail-stable/from_form.rs:10:13
|
10 | struct Foo2 { }
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:9:10
--> tests/ui-fail-stable/from_form.rs:9:10
|
9 | #[derive(FromForm)]
| ^^^^^^^^
@ -41,13 +41,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: tuple struct must have exactly one field
--> $DIR/from_form.rs:16:12
--> tests/ui-fail-stable/from_form.rs:16:12
|
16 | struct Foo4(usize, usize, usize);
| ^^^^^^^^^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:15:10
--> tests/ui-fail-stable/from_form.rs:15:10
|
15 | #[derive(FromForm)]
| ^^^^^^^^
@ -55,13 +55,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: only one lifetime is supported
--> $DIR/from_form.rs:19:25
--> tests/ui-fail-stable/from_form.rs:19:25
|
19 | struct NextTodoTask<'f, 'a> {
| ^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:18:10
--> tests/ui-fail-stable/from_form.rs:18:10
|
18 | #[derive(FromForm)]
| ^^^^^^^^
@ -70,13 +70,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:28:20
--> tests/ui-fail-stable/from_form.rs:28:20
|
28 | #[field(name = "isindex")]
| ^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:26:10
--> tests/ui-fail-stable/from_form.rs:26:10
|
26 | #[derive(FromForm)]
| ^^^^^^^^
@ -84,25 +84,25 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:36:5
--> tests/ui-fail-stable/from_form.rs:36:5
|
36 | foo: usize,
| ^^^
error: [help] declared in this field
--> $DIR/from_form.rs:36:5
--> tests/ui-fail-stable/from_form.rs:36:5
|
36 | foo: usize,
| ^^^
error: [note] previous field with conflicting name
--> $DIR/from_form.rs:34:5
--> tests/ui-fail-stable/from_form.rs:34:5
|
34 | #[field(name = "foo")]
| ^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:32:10
--> tests/ui-fail-stable/from_form.rs:32:10
|
32 | #[derive(FromForm)]
| ^^^^^^^^
@ -110,25 +110,25 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:43:20
--> tests/ui-fail-stable/from_form.rs:43:20
|
43 | #[field(name = "hello")]
| ^^^^^^^
error: [help] declared in this field
--> $DIR/from_form.rs:43:5
--> tests/ui-fail-stable/from_form.rs:43:5
|
43 | #[field(name = "hello")]
| ^
error: [note] previous field with conflicting name
--> $DIR/from_form.rs:41:5
--> tests/ui-fail-stable/from_form.rs:41:5
|
41 | #[field(name = "hello")]
| ^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:39:10
--> tests/ui-fail-stable/from_form.rs:39:10
|
39 | #[derive(FromForm)]
| ^^^^^^^^
@ -136,25 +136,25 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field name conflicts with previous name
--> $DIR/from_form.rs:50:20
--> tests/ui-fail-stable/from_form.rs:50:20
|
50 | #[field(name = "first")]
| ^^^^^^^
error: [help] declared in this field
--> $DIR/from_form.rs:50:5
--> tests/ui-fail-stable/from_form.rs:50:5
|
50 | #[field(name = "first")]
| ^
error: [note] previous field with conflicting name
--> $DIR/from_form.rs:49:5
--> tests/ui-fail-stable/from_form.rs:49:5
|
49 | first: String,
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:47:10
--> tests/ui-fail-stable/from_form.rs:47:10
|
47 | #[derive(FromForm)]
| ^^^^^^^^
@ -162,13 +162,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `field`
--> $DIR/from_form.rs:56:28
--> tests/ui-fail-stable/from_form.rs:56:28
|
56 | #[field(name = "blah", field = "bloo")]
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:54:10
--> tests/ui-fail-stable/from_form.rs:54:10
|
54 | #[derive(FromForm)]
| ^^^^^^^^
@ -176,13 +176,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[field(..)]`, found bare path "field"
--> $DIR/from_form.rs:62:7
--> tests/ui-fail-stable/from_form.rs:62:7
|
62 | #[field]
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:60:10
--> tests/ui-fail-stable/from_form.rs:60:10
|
60 | #[derive(FromForm)]
| ^^^^^^^^
@ -190,13 +190,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> $DIR/from_form.rs:68:13
--> tests/ui-fail-stable/from_form.rs:68:13
|
68 | #[field("blah")]
| ^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:66:10
--> tests/ui-fail-stable/from_form.rs:66:10
|
66 | #[derive(FromForm)]
| ^^^^^^^^
@ -204,13 +204,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected key/value `key = value`
--> $DIR/from_form.rs:74:13
--> tests/ui-fail-stable/from_form.rs:74:13
|
74 | #[field(123)]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:72:10
--> tests/ui-fail-stable/from_form.rs:72:10
|
72 | #[derive(FromForm)]
| ^^^^^^^^
@ -218,13 +218,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected attribute parameter: `beep`
--> $DIR/from_form.rs:80:13
--> tests/ui-fail-stable/from_form.rs:80:13
|
80 | #[field(beep = "bop")]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:78:10
--> tests/ui-fail-stable/from_form.rs:78:10
|
78 | #[derive(FromForm)]
| ^^^^^^^^
@ -232,25 +232,25 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: field has conflicting names
--> $DIR/from_form.rs:86:5
--> tests/ui-fail-stable/from_form.rs:86:5
|
86 | #[field(name = "blah")]
| ^
error: [note] this field name...
--> $DIR/from_form.rs:86:20
--> tests/ui-fail-stable/from_form.rs:86:20
|
86 | #[field(name = "blah")]
| ^^^^^^
error: [note] ...conflicts with this field name
--> $DIR/from_form.rs:87:20
--> tests/ui-fail-stable/from_form.rs:87:20
|
87 | #[field(name = "blah")]
| ^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:84:10
--> tests/ui-fail-stable/from_form.rs:84:10
|
84 | #[derive(FromForm)]
| ^^^^^^^^
@ -258,13 +258,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare boolean literal
--> $DIR/from_form.rs:93:20
--> tests/ui-fail-stable/from_form.rs:93:20
|
93 | #[field(name = true)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:91:10
--> tests/ui-fail-stable/from_form.rs:91:10
|
91 | #[derive(FromForm)]
| ^^^^^^^^
@ -272,13 +272,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected expression, found bare path "name"
--> $DIR/from_form.rs:99:13
--> tests/ui-fail-stable/from_form.rs:99:13
|
99 | #[field(name)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:97:10
--> tests/ui-fail-stable/from_form.rs:97:10
|
97 | #[derive(FromForm)]
| ^^^^^^^^
@ -286,13 +286,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected list `#[attr(..)]`, found bare integer literal
--> $DIR/from_form.rs:105:20
--> tests/ui-fail-stable/from_form.rs:105:20
|
105 | #[field(name = 123)]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:103:10
--> tests/ui-fail-stable/from_form.rs:103:10
|
103 | #[derive(FromForm)]
| ^^^^^^^^
@ -301,13 +301,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:111:20
--> tests/ui-fail-stable/from_form.rs:111:20
|
111 | #[field(name = "hello&world")]
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:109:10
--> tests/ui-fail-stable/from_form.rs:109:10
|
109 | #[derive(FromForm)]
| ^^^^^^^^
@ -316,13 +316,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:117:20
--> tests/ui-fail-stable/from_form.rs:117:20
|
117 | #[field(name = "!@#$%^&*()_")]
| ^^^^^^^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:115:10
--> tests/ui-fail-stable/from_form.rs:115:10
|
115 | #[derive(FromForm)]
| ^^^^^^^^
@ -331,13 +331,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:123:20
--> tests/ui-fail-stable/from_form.rs:123:20
|
123 | #[field(name = "?")]
| ^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:121:10
--> tests/ui-fail-stable/from_form.rs:121:10
|
121 | #[derive(FromForm)]
| ^^^^^^^^
@ -346,13 +346,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:129:20
--> tests/ui-fail-stable/from_form.rs:129:20
|
129 | #[field(name = "")]
| ^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:127:10
--> tests/ui-fail-stable/from_form.rs:127:10
|
127 | #[derive(FromForm)]
| ^^^^^^^^
@ -361,13 +361,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:135:20
--> tests/ui-fail-stable/from_form.rs:135:20
|
135 | #[field(name = "a&b")]
| ^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:133:10
--> tests/ui-fail-stable/from_form.rs:133:10
|
133 | #[derive(FromForm)]
| ^^^^^^^^
@ -376,13 +376,13 @@ error: [note] error occurred while deriving `FromForm`
error: invalid form field name
--- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']'
--> $DIR/from_form.rs:141:20
--> tests/ui-fail-stable/from_form.rs:141:20
|
141 | #[field(name = "a=")]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:139:10
--> tests/ui-fail-stable/from_form.rs:139:10
|
139 | #[derive(FromForm)]
| ^^^^^^^^
@ -390,13 +390,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error: duplicate attribute parameter: default
--> $DIR/from_form.rs:177:26
--> tests/ui-fail-stable/from_form.rs:177:26
|
177 | #[field(default = 1, default = 2)]
| ^^^^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:175:10
--> tests/ui-fail-stable/from_form.rs:175:10
|
175 | #[derive(FromForm)]
| ^^^^^^^^
@ -405,13 +405,13 @@ error: [note] error occurred while deriving `FromForm`
error: duplicate default field expression
--- help: at most one `default` or `default_with` is allowed
--> $DIR/from_form.rs:184:23
--> tests/ui-fail-stable/from_form.rs:184:23
|
184 | #[field(default = 2)]
| ^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:181:10
--> tests/ui-fail-stable/from_form.rs:181:10
|
181 | #[derive(FromForm)]
| ^^^^^^^^
@ -420,19 +420,19 @@ error: [note] error occurred while deriving `FromForm`
error: duplicate default expressions
--- help: only one of `default` or `default_with` must be used
--> $DIR/from_form.rs:190:23
--> tests/ui-fail-stable/from_form.rs:190:23
|
190 | #[field(default = 1, default_with = None)]
| ^
error: [note] other default expression is here
--> $DIR/from_form.rs:190:41
--> tests/ui-fail-stable/from_form.rs:190:41
|
190 | #[field(default = 1, default_with = None)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:188:10
--> tests/ui-fail-stable/from_form.rs:188:10
|
188 | #[derive(FromForm)]
| ^^^^^^^^
@ -441,19 +441,19 @@ error: [note] error occurred while deriving `FromForm`
error: duplicate default expressions
--- help: only one of `default` or `default_with` must be used
--> $DIR/from_form.rs:197:23
--> tests/ui-fail-stable/from_form.rs:197:23
|
197 | #[field(default = 1)]
| ^
error: [note] other default expression is here
--> $DIR/from_form.rs:196:28
--> tests/ui-fail-stable/from_form.rs:196:28
|
196 | #[field(default_with = None)]
| ^^^^
error: [note] error occurred while deriving `FromForm`
--> $DIR/from_form.rs:194:10
--> tests/ui-fail-stable/from_form.rs:194:10
|
194 | #[derive(FromForm)]
| ^^^^^^^^
@ -461,13 +461,13 @@ error: [note] error occurred while deriving `FromForm`
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find function `unknown` in this scope
--> $DIR/from_form.rs:153:24
--> tests/ui-fail-stable/from_form.rs:153:24
|
153 | #[field(validate = unknown())]
| ^^^^^^^ not found in this scope
error[E0308]: mismatched types
--> $DIR/from_form.rs:147:24
--> tests/ui-fail-stable/from_form.rs:147:24
|
147 | #[field(validate = 123)]
| -------- ^^^ expected enum `Result`, found integer
@ -478,7 +478,7 @@ error[E0308]: mismatched types
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/from_form.rs:160:12
--> tests/ui-fail-stable/from_form.rs:160:12
|
160 | first: String,
| ^^^^^^ expected enum `TempFile`, found struct `std::string::String`
@ -487,7 +487,7 @@ error[E0308]: mismatched types
found reference `&std::string::String`
error[E0308]: mismatched types
--> $DIR/from_form.rs:166:12
--> tests/ui-fail-stable/from_form.rs:166:12
|
166 | first: String,
| ^^^^^^ expected enum `TempFile`, found struct `std::string::String`
@ -496,13 +496,13 @@ error[E0308]: mismatched types
found reference `&std::string::String`
error[E0308]: mismatched types
--> $DIR/from_form.rs:165:28
--> tests/ui-fail-stable/from_form.rs:165:28
|
165 | #[field(validate = ext("hello"))]
| ^^^^^^^ expected struct `ContentType`, found `&str`
error[E0277]: the trait bound `i32: From<&str>` is not satisfied
--> $DIR/from_form.rs:171:23
--> tests/ui-fail-stable/from_form.rs:171:23
|
171 | #[field(default = "no conversion")]
| ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `i32`
@ -516,7 +516,7 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied
= note: required because of the requirements on the impl of `Into<i32>` for `&str`
error[E0308]: mismatched types
--> $DIR/from_form.rs:203:33
--> tests/ui-fail-stable/from_form.rs:203:33
|
203 | #[field(default_with = Some("hi"))]
| ^^^^ expected struct `std::string::String`, found `&str`
@ -524,6 +524,6 @@ error[E0308]: mismatched types
help: try using a conversion method
|
203 | #[field(default_with = Some("hi".to_string()))]
| ^^^^^^^^^^^^^^^^
| ++++++++++++
203 | #[field(default_with = Some("hi".to_string()))]
| ^^^^^^^^^^^^^^^^
| ++++++++++++

View File

@ -1,13 +1,11 @@
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:5:5
--> tests/ui-fail-stable/responder-types.rs:5:5
|
5 | thing: u8,
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= note: required by `respond_to`
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> $DIR/responder-types.rs:11:5
--> tests/ui-fail-stable/responder-types.rs:11:5
|
11 | other: u8,
| ^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
@ -19,17 +17,20 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `u8`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:16:5
--> tests/ui-fail-stable/responder-types.rs:16:5
|
16 | thing: u8,
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `u8`
|
= note: required by `respond_to`
error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
--> $DIR/responder-types.rs:17:5
--> tests/ui-fail-stable/responder-types.rs:17:5
|
17 | other: u8,
| ^^^^^ the trait `From<u8>` is not implemented for `Header<'_>`
@ -41,9 +42,14 @@ error[E0277]: the trait bound `Header<'_>: From<u8>` is not satisfied
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `u8`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not satisfied
--> $DIR/responder-types.rs:24:5
--> tests/ui-fail-stable/responder-types.rs:24:5
|
24 | then: String,
| ^^^^ the trait `From<std::string::String>` is not implemented for `Header<'_>`
@ -55,11 +61,20 @@ error[E0277]: the trait bound `Header<'_>: From<std::string::String>` is not sat
<Header<'static> as From<&Hsts>>
and 8 others
= note: required because of the requirements on the impl of `Into<Header<'_>>` for `std::string::String`
note: required by a bound in `rocket::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 `rocket::Response::<'r>::set_header`
error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied
--> $DIR/responder-types.rs:28:13
--> tests/ui-fail-stable/responder-types.rs:28:13
|
28 | fn foo() -> usize { 0 }
| ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize`
|
= note: required by `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`
note: required by a bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`
--> $WORKSPACE/core/lib/src/route/handler.rs
|
| pub fn from<R: Responder<'r, 'o>>(req: &'r Request<'_>, responder: R) -> Outcome<'r> {
| ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::<impl Outcome<rocket::Response<'o>, Status, rocket::Data<'o>>>::from`

View File

@ -1,5 +1,5 @@
error: missing expected parameter: `uri`
--> $DIR/route-attribute-general-syntax.rs:4:1
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:4:1
|
4 | #[get()]
| ^^^^^^^^
@ -8,196 +8,196 @@ error: missing expected parameter: `uri`
error: expected `fn`
--- help: #[get] can only be used on functions
--> $DIR/route-attribute-general-syntax.rs:9:1
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:9:1
|
9 | struct S;
| ^^^^^^
error: expected `fn`
--- help: #[get] can only be used on functions
--> $DIR/route-attribute-general-syntax.rs:12:1
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:12:1
|
12 | enum A { }
| ^^^^
error: expected `fn`
--- help: #[get] can only be used on functions
--> $DIR/route-attribute-general-syntax.rs:15:1
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:15:1
|
15 | trait Foo { }
| ^^^^^
error: expected `fn`
--- help: #[get] can only be used on functions
--> $DIR/route-attribute-general-syntax.rs:18:1
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:18:1
|
18 | impl S { }
| ^^^^
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:21:12
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:21:12
|
21 | #[get("/", 123)]
| ^^^
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:24:12
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:24:12
|
24 | #[get("/", "/")]
| ^^^
error: unexpected keyed parameter: expected literal or identifier
--> $DIR/route-attribute-general-syntax.rs:27:7
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:27:7
|
27 | #[get(data = "<foo>", "/")]
| ^^^^
error: unexpected attribute parameter: `unknown`
--> $DIR/route-attribute-general-syntax.rs:30:12
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:30:12
|
30 | #[get("/", unknown = "foo")]
| ^^^^^^^
error: expected key/value `key = value`
--> $DIR/route-attribute-general-syntax.rs:33:12
--> 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`
--> $DIR/route-attribute-general-syntax.rs:39:7
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:39:7
|
39 | fn c1(_: usize) {}
| ^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:43:7
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:43:7
|
43 | #[get(100)]
| ^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:46:7
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:46:7
|
46 | #[get('/')]
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:49:19
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:49:19
|
49 | #[get("/", rank = "1")]
| ^^^
error: invalid value: expected integer literal
--> $DIR/route-attribute-general-syntax.rs:52:19
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:52:19
|
52 | #[get("/", rank = '1')]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:57:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:57:21
|
57 | #[get("/", format = "applicationx-custom")]
| ^^^^^^^^^^^^^^^^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:60:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:60:21
|
60 | #[get("/", format = "")]
| ^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:63:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:63:21
|
63 | #[get("/", format = "//")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:66:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:66:21
|
66 | #[get("/", format = "/")]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:69:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:69:21
|
69 | #[get("/", format = "a/")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:72:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:72:21
|
72 | #[get("/", format = "/a")]
| ^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:75:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:75:21
|
75 | #[get("/", format = "/a/")]
| ^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:78:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:78:21
|
78 | #[get("/", format = "a/b/")]
| ^^^^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:81:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:81:21
|
81 | #[get("/", format = "unknown")]
| ^^^^^^^^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:84:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:84:21
|
84 | #[get("/", format = 12)]
| ^^
error: invalid value: expected string literal
--> $DIR/route-attribute-general-syntax.rs:87:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:87:21
|
87 | #[get("/", format = 'j')]
| ^^^
error: invalid or unknown media type
--> $DIR/route-attribute-general-syntax.rs:90:21
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:90:21
|
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`
--> $DIR/route-attribute-general-syntax.rs:95:9
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:95:9
|
95 | #[route(CONNECT, "/")]
| ^^^^^^^
error: invalid HTTP method
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
--> $DIR/route-attribute-general-syntax.rs:98:9
--> 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`
--> $DIR/route-attribute-general-syntax.rs:101:9
--> 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`
--> $DIR/route-attribute-general-syntax.rs:104:9
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:104:9
|
104 | #[route("GET", "/")]
| ^^^^^
error: expected identifier, found integer literal
--- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS`
--> $DIR/route-attribute-general-syntax.rs:107:9
--> tests/ui-fail-stable/route-attribute-general-syntax.rs:107:9
|
107 | #[route(120, "/")]
| ^^^

View File

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

View File

@ -1,21 +1,17 @@
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:6:12
--> tests/ui-fail-stable/route-type-errors.rs:6:12
|
6 | fn f0(foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`
error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied
--> $DIR/route-type-errors.rs:9:12
--> tests/ui-fail-stable/route-type-errors.rs:9:12
|
9 | fn f1(foo: Q) {}
| ^ the trait `FromSegments<'_>` is not implemented for `Q`
|
= note: required by `from_segments`
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> $DIR/route-type-errors.rs:12:12
--> tests/ui-fail-stable/route-type-errors.rs:12:12
|
12 | fn f2(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
@ -23,7 +19,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required because of the requirements on the impl of `FromForm<'_>` for `Q`
error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
--> $DIR/route-type-errors.rs:15:12
--> tests/ui-fail-stable/route-type-errors.rs:15:12
|
15 | fn f3(foo: Q) {}
| ^ the trait `FromFormField<'_>` is not implemented for `Q`
@ -31,58 +27,37 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied
= note: required because of the requirements on the impl of `FromForm<'_>` for `Q`
error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied
--> $DIR/route-type-errors.rs:18:12
--> tests/ui-fail-stable/route-type-errors.rs:18:12
|
18 | fn f4(foo: Q) {}
| ^ the trait `FromData<'_>` is not implemented for `Q`
|
::: $WORKSPACE/core/lib/src/data/from_data.rs
|
| async fn from_data(req: &'r Request<'_>, data: Data<'r>) -> Outcome<'r, Self>;
| -- required by this bound in `rocket::data::FromData::from_data`
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> $DIR/route-type-errors.rs:21:10
--> tests/ui-fail-stable/route-type-errors.rs:21:10
|
21 | fn f5(a: Q, foo: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
::: $WORKSPACE/core/lib/src/request/from_request.rs
|
| async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error>;
| -- required by this bound in `from_request`
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:21:18
--> tests/ui-fail-stable/route-type-errors.rs:21:18
|
21 | fn f5(a: Q, foo: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`
error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:10
--> tests/ui-fail-stable/route-type-errors.rs:24:10
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^ the trait `FromRequest<'_>` is not implemented for `Q`
|
::: $WORKSPACE/core/lib/src/request/from_request.rs
|
| async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error>;
| -- required by this bound in `from_request`
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:18
--> tests/ui-fail-stable/route-type-errors.rs:24:18
|
24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {}
| ^ the trait `FromParam<'_>` is not implemented for `Q`
|
= note: required by `from_param`
error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied
--> $DIR/route-type-errors.rs:24:39
--> tests/ui-fail-stable/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`
|
= note: required by `from_param`

View File

@ -1,11 +1,5 @@
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uri-bad-type.rs:22:37
|
22 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected enum `Infallible`, found `&str`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:45:22
--> tests/ui-fail-stable/typed-uri-bad-type.rs:45:22
|
45 | uri!(simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -14,10 +8,9 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:47:17
--> tests/ui-fail-stable/typed-uri-bad-type.rs:47:17
|
47 | uri!(simple("hello"));
| ^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -26,10 +19,9 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, i64>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:49:22
--> tests/ui-fail-stable/typed-uri-bad-type.rs:49:22
|
49 | uri!(simple(id = 239239i64));
| ^^^^^^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, i64>` is not implemented for `usize`
@ -38,18 +30,15 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Path, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:51:30
--> tests/ui-fail-stable/typed-uri-bad-type.rs:51:30
|
51 | uri!(not_uri_display(10, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Path, _>` is not implemented for `S`
|
= note: required by `from_uri_param`
error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:56:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:56: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`
@ -59,10 +48,9 @@ error[E0277]: the trait bound `i32: FromUriParam<rocket::http::uri::fmt::Path, s
<i32 as FromUriParam<P, &'x mut i32>>
<i32 as FromUriParam<P, i32>>
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::fmt::Path, std::option::Option<{integer}>>` for `std::option::Option<i32>`
= note: required by `from_uri_param`
error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:56:42
--> tests/ui-fail-stable/typed-uri-bad-type.rs:56:42
|
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`
@ -74,10 +62,9 @@ error[E0277]: the trait bound `std::string::String: FromUriParam<rocket::http::u
<std::string::String as FromUriParam<P, &'x mut std::string::String>>
and 2 others
= note: required because of the requirements on the impl of `FromUriParam<rocket::http::uri::fmt::Path, Result<_, _>>` for `Result<std::string::String, &str>`
= note: required by `from_uri_param`
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:58:19
--> tests/ui-fail-stable/typed-uri-bad-type.rs:58:19
|
58 | uri!(simple_q("hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
@ -86,10 +73,9 @@ error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:60:24
--> tests/ui-fail-stable/typed-uri-bad-type.rs:60:24
|
60 | uri!(simple_q(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Query, &str>` is not implemented for `isize`
@ -98,56 +84,51 @@ error[E0277]: the trait bound `isize: FromUriParam<rocket::http::uri::fmt::Query
<isize as FromUriParam<P, &'x isize>>
<isize as FromUriParam<P, &'x mut isize>>
<isize as FromUriParam<P, isize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:62:23
--> tests/ui-fail-stable/typed-uri-bad-type.rs:62:23
|
62 | uri!(other_q(100, S));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`
error[E0277]: the trait bound `S: FromUriParam<rocket::http::uri::fmt::Query, _>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:64:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:64:25
|
64 | uri!(other_q(rest = S, id = 100));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`
error[E0277]: the trait bound `S: Ignorable<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:66:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:66:25
|
66 | uri!(other_q(rest = _, id = 100));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `S`
|
::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
note: required by a bound in `assert_ignorable`
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
| pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| ------------ required by this 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
--> $DIR/typed-uri-bad-type.rs:68:33
--> tests/ui-fail-stable/typed-uri-bad-type.rs:68:33
|
68 | uri!(other_q(rest = S, id = _));
| ^ the trait `Ignorable<rocket::http::uri::fmt::Query>` is not implemented for `usize`
|
::: $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
note: required by a bound in `assert_ignorable`
--> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs
|
| pub fn assert_ignorable<P: Part, T: Ignorable<P>>() { }
| ------------ required by this 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
--> $DIR/typed-uri-bad-type.rs:68:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:68:25
|
68 | uri!(other_q(rest = S, id = _));
| ^ the trait `FromUriParam<rocket::http::uri::fmt::Query, _>` is not implemented for `S`
|
= note: required by `from_uri_param`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:77:40
--> tests/ui-fail-stable/typed-uri-bad-type.rs:77:40
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -156,16 +137,23 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied
--> $DIR/typed-uri-bad-type.rs:77:15
--> tests/ui-fail-stable/typed-uri-bad-type.rs:77:15
|
77 | uri!(uri!("?foo#bar"), simple(id = "hi"));
| ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| --- ^^^^^^^^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Reference<'_>`
| |
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn with_prefix<P: ValidRoutePrefix>(self, p: P) -> PrefixedRouteUri<P::Output> {
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:78:33
--> tests/ui-fail-stable/typed-uri-bad-type.rs:78:33
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -174,16 +162,23 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied
--> $DIR/typed-uri-bad-type.rs:78:15
--> tests/ui-fail-stable/typed-uri-bad-type.rs:78:15
|
78 | uri!(uri!("*"), simple(id = "hi"));
| ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| --- ^^^ the trait `ValidRoutePrefix` is not implemented for `rocket::http::uri::Asterisk`
| |
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_prefix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn with_prefix<P: ValidRoutePrefix>(self, p: P) -> PrefixedRouteUri<P::Output> {
| ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix`
error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path, &str>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:81:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:81:25
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -192,16 +187,23 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:81:37
--> tests/ui-fail-stable/typed-uri-bad-type.rs:81:37
|
81 | uri!(_, simple(id = "hi"), uri!("*"));
| ^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| --- ^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Asterisk`
| |
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| 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
--> $DIR/typed-uri-bad-type.rs:82:25
--> tests/ui-fail-stable/typed-uri-bad-type.rs:82:25
|
82 | uri!(_, simple(id = "hi"), uri!("/foo/bar"));
| ^^^^ the trait `FromUriParam<rocket::http::uri::fmt::Path, &str>` is not implemented for `usize`
@ -210,10 +212,23 @@ error[E0277]: the trait bound `usize: FromUriParam<rocket::http::uri::fmt::Path,
<usize as FromUriParam<P, &'x mut usize>>
<usize as FromUriParam<P, &'x usize>>
<usize as FromUriParam<P, usize>>
= note: required by `from_uri_param`
error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not satisfied
--> $DIR/typed-uri-bad-type.rs:82:37
--> tests/ui-fail-stable/typed-uri-bad-type.rs:82: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<'_>`
| --- ^^^^^^^^^^ the trait `ValidRouteSuffix<rocket::http::uri::Origin<'static>>` is not implemented for `rocket::http::uri::Origin<'_>`
| |
| required by a bound introduced by this call
|
note: required by a bound in `RouteUriBuilder::with_suffix`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| where S: ValidRouteSuffix<Origin<'static>>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix`
error[E0271]: type mismatch resolving `<std::string::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 enum `Infallible`, found `&str`

View File

@ -1,44 +1,44 @@
error: expected identifier
--> $DIR/typed-uris-bad-params.rs:63:18
--> 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 "/<_>"
--> $DIR/typed-uris-bad-params.rs:69:18
--> 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: "/<_>"
--> $DIR/typed-uris-bad-params.rs:67:18
--> 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 "/<_>"
--> $DIR/typed-uris-bad-params.rs:65:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:65:18
|
65 | uri!(ignored(10, 20));
| ^^
error: path parameters cannot be ignored
--> $DIR/typed-uris-bad-params.rs:61:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:61:18
|
61 | uri!(ignored(_));
| ^
error: path parameters cannot be ignored
--> $DIR/typed-uris-bad-params.rs:59:36
--> tests/ui-fail-stable/typed-uris-bad-params.rs:59:36
|
59 | uri!(optionals(id = 10, name = _));
| ^
error: path parameters cannot be ignored
--> $DIR/typed-uris-bad-params.rs:57:25
--> tests/ui-fail-stable/typed-uris-bad-params.rs:57:25
|
57 | uri!(optionals(id = _, name = "bob".into()));
| ^
@ -46,13 +46,13 @@ error: path parameters cannot be ignored
error: invalid parameters for `has_two` route uri
--- note: uri parameters are: id: i32, name: String
--- help: missing parameter: `name`
--> $DIR/typed-uris-bad-params.rs:55:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18
|
55 | uri!(has_two(id = 100, cookies = "hi"));
| ^^
error: [help] unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:55:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:55:28
|
55 | uri!(has_two(id = 100, cookies = "hi"));
| ^^^^^^^
@ -60,19 +60,19 @@ error: [help] unknown parameter: `cookies`
error: invalid parameters for `has_two` route uri
--- note: uri parameters are: id: i32, name: String
--- help: missing parameter: `name`
--> $DIR/typed-uris-bad-params.rs:53:18
--> 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`
--> $DIR/typed-uris-bad-params.rs:53:18
--> 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] duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:53:44
--> tests/ui-fail-stable/typed-uris-bad-params.rs:53:44
|
53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10));
| ^^
@ -80,7 +80,7 @@ error: [help] duplicate parameter: `id`
error: invalid parameters for `has_two` route uri
--- note: uri parameters are: id: i32, name: String
--- help: missing parameter: `id`
--> $DIR/typed-uris-bad-params.rs:51:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18
|
51 | uri!(has_two(name = "hi"));
| ^^^^
@ -88,39 +88,39 @@ error: invalid parameters for `has_two` route uri
error: invalid parameters for `has_two` route uri
--- note: uri parameters are: id: i32, name: String
--- help: missing parameter: `name`
--> $DIR/typed-uris-bad-params.rs:49:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:18
|
49 | uri!(has_two(id = 100, id = 100, ));
| ^^
error: [help] duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:49:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:49:28
|
49 | uri!(has_two(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one_guarded` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:47:26
--> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^
error: [help] unknown parameter: `cookies`
--> $DIR/typed-uris-bad-params.rs:47:36
--> tests/ui-fail-stable/typed-uris-bad-params.rs:47:36
|
47 | uri!(has_one_guarded(id = 100, cookies = "hi"));
| ^^^^^^^
error: invalid parameters for `has_one_guarded` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:45:26
--> 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`
--> $DIR/typed-uris-bad-params.rs:45:26
--> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26
|
45 | uri!(has_one_guarded(cookies = "hi", id = 100));
| ^^^^^^^
@ -128,152 +128,152 @@ error: [help] unknown parameter: `cookies`
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--- help: missing parameter: `id`
--> $DIR/typed-uris-bad-params.rs:43:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18
|
43 | uri!(has_one(name = "hi"));
| ^^^^
error: [help] unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:43:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18
|
43 | uri!(has_one(name = "hi"));
| ^^^^
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:41:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:41:18
|
41 | uri!(has_one(id = 100, id = 100, ));
| ^^
error: [help] duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:41:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:41:28
|
41 | uri!(has_one(id = 100, id = 100, ));
| ^^
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:39:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18
|
39 | uri!(has_one(id = 100, id = 100));
| ^^
error: [help] duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:39:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:39:28
|
39 | uri!(has_one(id = 100, id = 100));
| ^^
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:37:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^
error: [help] unknown parameters: `name`, `age`
--> $DIR/typed-uris-bad-params.rs:37:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18
|
37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50));
| ^^^^
error: [help] duplicate parameter: `id`
--> $DIR/typed-uris-bad-params.rs:37:50
--> 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
--> $DIR/typed-uris-bad-params.rs:35:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^
error: [help] unknown parameters: `name`, `age`
--> $DIR/typed-uris-bad-params.rs:35:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18
|
35 | uri!(has_one(name = 100, age = 50, id = 100));
| ^^^^
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:33:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18
|
33 | uri!(has_one(name = 100, id = 100));
| ^^^^
error: [help] unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:33:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18
|
33 | uri!(has_one(name = 100, id = 100));
| ^^^^
error: invalid parameters for `has_one` route uri
--- note: uri parameters are: id: i32
--> $DIR/typed-uris-bad-params.rs:31:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:31:18
|
31 | uri!(has_one(id = 100, name = "hi"));
| ^^
error: [help] unknown parameter: `name`
--> $DIR/typed-uris-bad-params.rs:31:28
--> tests/ui-fail-stable/typed-uris-bad-params.rs:31:28
|
31 | uri!(has_one(id = 100, name = "hi"));
| ^^^^
error: route expects 2 parameters but 1 was supplied
--- note: route `has_two` has uri "/<id>?<name>"
--> $DIR/typed-uris-bad-params.rs:29:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:29:18
|
29 | uri!(has_two(10));
| ^^
error: route expects 2 parameters but 3 were supplied
--- note: route `has_two` has uri "/<id>?<name>"
--> $DIR/typed-uris-bad-params.rs:28:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:28:18
|
28 | uri!(has_two(10, "hi", "there"));
| ^^
error: route expects 1 parameter but 2 were supplied
--- note: route `has_one_guarded` has uri "/<id>"
--> $DIR/typed-uris-bad-params.rs:26:26
--> tests/ui-fail-stable/typed-uris-bad-params.rs:26:26
|
26 | uri!(has_one_guarded("hi", 100));
| ^^^^
error: route expects 1 parameter but 2 were supplied
--- note: route `has_one` has uri "/<id>"
--> $DIR/typed-uris-bad-params.rs:25:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:25:18
|
25 | uri!(has_one("Hello", 23, ));
| ^^^^^^^
error: route expects 1 parameter but 2 were supplied
--- note: route `has_one` has uri "/<id>"
--> $DIR/typed-uris-bad-params.rs:24:18
--> tests/ui-fail-stable/typed-uris-bad-params.rs:24:18
|
24 | uri!(has_one(1, 23));
| ^
error: route expects 1 parameter but 0 were supplied
--- note: route `has_one` has uri "/<id>"
--> $DIR/typed-uris-bad-params.rs:22:10
--> tests/ui-fail-stable/typed-uris-bad-params.rs:22:10
|
22 | uri!(has_one());
| ^^^^^^^
error: route expects 1 parameter but 0 were supplied
--- note: route `has_one` has uri "/<id>"
--> $DIR/typed-uris-bad-params.rs:21:10
--> tests/ui-fail-stable/typed-uris-bad-params.rs:21:10
|
21 | uri!(has_one);
| ^^^^^^^
error[E0271]: type mismatch resolving `<std::string::String as FromParam<'_>>::Error == &str`
--> $DIR/typed-uris-bad-params.rs:15:37
--> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37
|
15 | fn optionals(id: Option<i32>, name: Result<String, &str>) { }
| ^^^^^^ expected enum `Infallible`, found `&str`

View File

@ -1,152 +1,152 @@
error: expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:10:28
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:10:28
|
10 | uri!(simple: id = 100, "Hello");
| ^^^^^^^
error: named and unnamed parameters cannot be mixed
--> $DIR/typed-uris-invalid-syntax.rs:11:17
--> 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
--> $DIR/typed-uris-invalid-syntax.rs:12:17
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:12:17
|
12 | uri!(simple("Hello", id = 100));
| ^^^^^^^
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:14:16
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:14:16
|
14 | uri!(simple:);
| ^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:16:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:16:10
|
16 | uri!("mount", simple);
| ^^^^^^^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:17:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:17:10
|
17 | uri!("mount", simple, "http://");
| ^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:18:28
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:18:28
|
18 | uri!("/mount", simple, "http://");
| ^^^^^^^^^
error: expected 1, 2, or 3 arguments, found 4
--> $DIR/typed-uris-invalid-syntax.rs:19:36
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:19:36
|
19 | uri!("/mount", simple, "#foo", "?foo");
| ^^^^^^
error: invalid URI: unexpected EOF: expected token ':' at index 5
--> $DIR/typed-uris-invalid-syntax.rs:20:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:20:10
|
20 | uri!("mount", simple(10, "hi"), "http://");
| ^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:21:38
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:21:38
|
21 | uri!("/mount", simple(10, "hi"), "http://");
| ^^^^^^^^^
error: URI prefix cannot contain query part
--> $DIR/typed-uris-invalid-syntax.rs:22:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:22:10
|
22 | uri!("/mount?foo", simple(10, "hi"), "foo/bar?foo#bar");
| ^^^^^^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:23:38
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:23:38
|
23 | uri!("/mount", simple(10, "hi"), "a/b");
| ^^^^^
error: expected 1, 2, or 3 arguments, found 4
--> $DIR/typed-uris-invalid-syntax.rs:24:46
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:24:46
|
24 | uri!("/mount", simple(10, "hi"), "#foo", "?foo");
| ^^^^^^
error: invalid URI: unexpected token '<' at index 7
--> $DIR/typed-uris-invalid-syntax.rs:25:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:25:10
|
25 | uri!("/mount/<id>", simple);
| ^^^^^^^^^^^^^
error: expected at least 1 argument, found none
--> $DIR/typed-uris-invalid-syntax.rs:26:5
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:26:5
|
26 | uri!();
| ^^^^^^^
| ^^^^^^
|
= note: this error originates in the macro `uri` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:27:16
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:27:16
|
27 | uri!(simple: id = );
| ^
error: unexpected end of input, expected expression
--> $DIR/typed-uris-invalid-syntax.rs:28:16
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:28:22
|
28 | uri!(simple(id = ));
| ^^^^^^^
| ^
error: invalid URI: unexpected EOF: expected some token at index 0
--> $DIR/typed-uris-invalid-syntax.rs:29:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:29:10
|
29 | uri!("*", simple(10), "hi");
| ^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:30:40
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:30:40
|
30 | uri!("some.host:8088", simple(10), "hi");
| ^^^^
error: expected identifier
--> $DIR/typed-uris-invalid-syntax.rs:33:18
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:33:18
|
33 | uri!("/foo", "bar");
| ^^^^^
error: unexpected token
--> $DIR/typed-uris-invalid-syntax.rs:34:17
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:34:17
|
34 | uri!("/foo" ("bar"));
| ^^^^^^^
error: URI prefix cannot contain query part
--> $DIR/typed-uris-invalid-syntax.rs:35:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:35:10
|
35 | uri!("ftp:?", index);
| ^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:36:25
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:36:25
|
36 | uri!("ftp:", index, "foo#bar");
| ^^^^^^^^^
error: URI suffix must contain only query and/or fragment
--> $DIR/typed-uris-invalid-syntax.rs:37:25
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:37:25
|
37 | uri!("ftp:", index, "foo?bar");
| ^^^^^^^^^
error: route expects 2 parameters but 0 were supplied
--- note: route `simple` has uri "/<id>/<name>"
--> $DIR/typed-uris-invalid-syntax.rs:13:10
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:13:10
|
13 | uri!(simple,);
| ^^^^^^

View File

@ -1,61 +1,96 @@
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:6:13
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:10:5
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:16:5
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:21:11
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:27:9
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Query>` is not satisfied
--> $DIR/uri_display_type_errors.rs:35:9
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&BadType`
= note: 1 redundant requirements hidden
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Query>` for `&&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_named_value<T: UriDisplay<Query>>(&mut self, name: &str, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value`
error[E0277]: the trait bound `BadType: UriDisplay<rocket::http::uri::fmt::Path>` is not satisfied
--> $DIR/uri_display_type_errors.rs:40:12
--> 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`
|
= note: required because of the requirements on the impl of `UriDisplay<rocket::http::uri::fmt::Path>` for `&BadType`
note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`
--> $WORKSPACE/core/http/src/uri/fmt/formatter.rs
|
| pub fn write_value<T: UriDisplay<P>>(&mut self, value: T) -> fmt::Result {
| ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value`

View File

@ -1,5 +1,8 @@
//! Extension traits implemented by several HTTP types.
// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition.
#![allow(deprecated)]
use smallvec::{Array, SmallVec};
use state::Storage;

View File

@ -37,6 +37,7 @@ pub struct Request<'r> {
#[derive(Clone)]
pub(crate) struct ConnectionMeta {
pub remote: Option<SocketAddr>,
#[cfg_attr(not(feature = "mtls"), allow(dead_code))]
pub client_certificates: Option<Arc<Vec<RawCertificate>>>,
}

View File

@ -1,3 +1,6 @@
// Temporarily allow `IntoIter::into_iter()` before Rust 2021 transition.
#![allow(deprecated)]
use std::array;
use std::borrow::Cow;

View File

@ -83,8 +83,6 @@ pub(crate) struct Metadata {
pub base_segs: Vec<Segment>,
/// Segments in the path, including base.
pub path_segs: Vec<Segment>,
/// Segments in the query.
pub query_segs: Vec<Segment>,
/// `(name, value)` of the query segments that are static.
pub static_query_fields: Vec<(String, String)>,
/// The "color" of the route path.
@ -288,8 +286,8 @@ impl Metadata {
let trailing_path = path_segs.last().map_or(false, |p| p.trailing);
Metadata {
base_segs, path_segs, query_segs, static_query_fields,
path_color, query_color, trailing_path,
base_segs, path_segs, static_query_fields, path_color, query_color,
trailing_path,
}
}
}

View File

@ -4,6 +4,7 @@ use rocket::form::{Form, FromForm};
use rocket::form::error::{Error, Errors, ErrorKind};
#[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Cat<'v> {
#[field(validate = len(5..))]
name: &'v str,
@ -12,12 +13,14 @@ struct Cat<'v> {
}
#[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Dog<'v> {
#[field(validate = len(5..))]
name: &'v str,
}
#[derive(Debug, FromForm)]
#[allow(dead_code)]
struct Person<'v> {
kitty: Cat<'v>,
#[field(validate = len(1..))]