From 923b61edf37424692a32727513b0062283ead741 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Thu, 26 Oct 2023 20:25:33 -0500 Subject: [PATCH] Update UI tests. --- .../ui-fail-nightly/database-types.stderr | 99 ++++++++++++ .../ui-fail-stable/database-syntax.stderr | 2 +- .../tests/ui-fail-nightly/async-entry.stderr | 26 ++-- .../ui-fail-nightly/catch_type_errors.stderr | 64 ++++---- .../from_form_type_errors.stderr | 90 +++++++++-- .../ui-fail-nightly/responder-types.stderr | 78 +++++----- .../ui-fail-nightly/route-type-errors.stderr | 144 +++++++++--------- .../ui-fail-nightly/typed-uri-bad-type.stderr | 128 ++++++++-------- .../typed-uris-invalid-syntax.stderr | 2 +- .../uri_display_type_errors.stderr | 112 +++++++------- .../tests/ui-fail-stable/async-entry.stderr | 42 +++-- .../bad-ignored-segments.stderr | 4 +- .../codegen/tests/ui-fail-stable/catch.stderr | 18 +-- .../tests/ui-fail-stable/from_form.stderr | 32 ++-- .../route-attribute-general-syntax.stderr | 20 +-- .../route-path-bad-syntax.stderr | 42 ++--- .../ui-fail-stable/typed-uri-bad-type.stderr | 8 +- .../typed-uris-bad-params.stderr | 60 ++++---- .../typed-uris-invalid-syntax.stderr | 4 +- 19 files changed, 578 insertions(+), 397 deletions(-) diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr index 64be8774fe..68af4c6f06 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-nightly/database-types.stderr @@ -45,3 +45,102 @@ note: required by a bound in `ConnectionPool` | | pub struct ConnectionPool { | ^^^^^^^^ required by this bound in `ConnectionPool` + +error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:5:1 + | +3 | struct Unknown; + | -------------- doesn't satisfy `Unknown: Poolable` +4 | +5 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `ConnectionPool` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Unknown: Poolable` +note: the trait `Poolable` must be implemented + --> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs + | + | pub trait Poolable: Send + Sized + 'static { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: the method `run` exists for struct `Connection`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:5:1 + | +3 | struct Unknown; + | -------------- doesn't satisfy `Unknown: Poolable` +4 | +5 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Connection` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Unknown: Poolable` +note: the trait `Poolable` must be implemented + --> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs + | + | pub trait Poolable: Send + Sized + 'static { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:5:1 + | +3 | struct Unknown; + | -------------- doesn't satisfy `Unknown: Poolable` +4 | +5 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `ConnectionPool` due to unsatisfied trait bounds + | + = note: the following trait bounds were not satisfied: + `Unknown: Poolable` +note: the trait `Poolable` must be implemented + --> $WORKSPACE/contrib/sync_db_pools/lib/src/poolable.rs + | + | pub trait Poolable: Send + Sized + 'static { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: the function or associated item `fairing` exists for struct `ConnectionPool>`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:8:1 + | +8 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `ConnectionPool>` due to unsatisfied trait bounds + | + ::: $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec: Poolable` + | + = note: the following trait bounds were not satisfied: + `Vec: Poolable` + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: the method `run` exists for struct `Connection>`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:8:1 + | +8 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Connection>` due to unsatisfied trait bounds + | + ::: $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec: Poolable` + | + = note: the following trait bounds were not satisfied: + `Vec: Poolable` + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0599]: the function or associated item `get_one` exists for struct `ConnectionPool>`, but its trait bounds were not satisfied + --> tests/ui-fail-nightly/database-types.rs:8:1 + | +8 | #[database("foo")] + | ^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `ConnectionPool>` due to unsatisfied trait bounds + | + ::: $RUST/alloc/src/vec/mod.rs + | + | pub struct Vec { + | ------------------------------------------------------------------------------------------------ doesn't satisfy `Vec: Poolable` + | + = note: the following trait bounds were not satisfied: + `Vec: Poolable` + = note: this error originates in the attribute macro `database` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr index 9523d0ca86..e850902edf 100644 --- a/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr +++ b/contrib/sync_db_pools/codegen/tests/ui-fail-stable/database-syntax.stderr @@ -31,7 +31,7 @@ error: `database` attribute can only be used on structs | ^^^^ error: `database` attribute can only be applied to structs with exactly one unnamed field - --- help: example: `struct MyDatabase(diesel::SqliteConnection);` + = help: example: `struct MyDatabase(diesel::SqliteConnection);` --> tests/ui-fail-stable/database-syntax.rs:43:11 | 43 | struct Bar(Connection, Connection); diff --git a/core/codegen/tests/ui-fail-nightly/async-entry.stderr b/core/codegen/tests/ui-fail-nightly/async-entry.stderr index dc7cf6124c..f6acb1576b 100644 --- a/core/codegen/tests/ui-fail-nightly/async-entry.stderr +++ b/core/codegen/tests/ui-fail-nightly/async-entry.stderr @@ -106,12 +106,20 @@ note: this function cannot be `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 - --> tests/ui-fail-nightly/async-entry.rs:73:41 + --> tests/ui-fail-nightly/async-entry.rs:73:42 | 72 | fn rocket() -> _ { | ------ this is not `async` 73 | let _ = rocket::build().launch().await; - | ^^^^^^ only allowed inside `async` functions and blocks + | ^^^^^ only allowed inside `async` functions and blocks + +error[E0277]: `main` has invalid return type `Rocket` + --> tests/ui-fail-nightly/async-entry.rs:94:20 + | +94 | async fn main() -> rocket::Rocket { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` + | + = help: consider using `()`, or a `Result` error[E0308]: mismatched types --> tests/ui-fail-nightly/async-entry.rs:35:9 @@ -141,9 +149,9 @@ error[E0308]: mismatched types --> tests/ui-fail-nightly/async-entry.rs:24:21 | 24 | async fn main() { - | ^ expected `()` because of default return type - | _____________________| - | | + | ____________________-^ + | | | + | | expected `()` because of default return type 25 | | rocket::build() 26 | | } | | ^- help: consider using a semicolon here: `;` @@ -170,11 +178,3 @@ error[E0308]: mismatched types | = note: expected struct `Rocket` found struct `std::string::String` - -error[E0277]: `main` has invalid return type `Rocket` - --> tests/ui-fail-nightly/async-entry.rs:94:20 - | -94 | async fn main() -> rocket::Rocket { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` - | - = help: consider using `()`, or a `Result` diff --git a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr index 1f46c0f915..a461ccbdd4 100644 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr @@ -7,14 +7,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'o>> + > + as Responder<'r, 'r>> + > and $N others error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied @@ -26,14 +26,14 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied | ^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'o>> + > + as Responder<'r, 'r>> + > and $N others error[E0308]: mismatched types @@ -59,14 +59,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'o>> + > + as Responder<'r, 'r>> + > and $N others error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied @@ -78,12 +78,12 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> + as Responder<'r, 'o>> + > + as Responder<'r, 'r>> + > and $N others diff --git a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr index 2021692b31..4110ff3c60 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form_type_errors.stderr @@ -5,14 +5,14 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied | ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown` | = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others = note: required for `Unknown` to implement `FromForm<'r>` @@ -23,13 +23,71 @@ error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied | ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo` | = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others = note: required for `Foo` to implement `FromForm<'r>` + +error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied + --> tests/ui-fail-nightly/from_form_type_errors.rs:5:10 + | +5 | #[derive(FromForm)] + | ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown` + | + = help: the following other types implement trait `FromFormField<'v>`: + bool + isize + i8 + i16 + i32 + i64 + i128 + usize + and $N others + = note: required for `Unknown` to implement `FromForm<'r>` +note: required because it appears within the type `FromFormGeneratedContext<'r>` + --> tests/ui-fail-nightly/from_form_type_errors.rs:6:8 + | +6 | struct BadType3 { + | ^^^^^^^^ +note: required by a bound in `rocket::form::FromForm::Context` + --> $WORKSPACE/core/lib/src/form/from_form.rs + | + | type Context: Send; + | ^^^^ required by this bound in `FromForm::Context` + = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied + --> tests/ui-fail-nightly/from_form_type_errors.rs:12:10 + | +12 | #[derive(FromForm)] + | ^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo` + | + = help: the following other types implement trait `FromFormField<'v>`: + bool + isize + i8 + i16 + i32 + i64 + i128 + usize + and $N others + = note: required for `Foo` to implement `FromForm<'r>` +note: required because it appears within the type `FromFormGeneratedContext<'r>` + --> tests/ui-fail-nightly/from_form_type_errors.rs:13:8 + | +13 | struct Other { + | ^^^^^ +note: required by a bound in `rocket::form::FromForm::Context` + --> $WORKSPACE/core/lib/src/form/from_form.rs + | + | type Context: Send; + | ^^^^ required by this bound in `FromForm::Context` + = note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr index 831a1f48e9..c54893bf41 100644 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder-types.stderr @@ -5,14 +5,14 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + > + > + > + > + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> and $N others error[E0277]: the trait bound `Header<'_>: From` is not satisfied @@ -22,14 +22,14 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | = help: the following other types implement trait `From`: + as From>> + as From> + as From> as From<&Cookie<'_>>> + as From<&Referrer>> as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> + as From<&Hsts>> and $N others = note: required for `u8` to implement `Into>` note: required by a bound in `rocket::Response::<'r>::set_header` @@ -45,14 +45,14 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied | ^^ the trait `Responder<'_, '_>` is not implemented for `u8` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + > + > + > + > + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> and $N others error[E0277]: the trait bound `Header<'_>: From` is not satisfied @@ -62,14 +62,14 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | = help: the following other types implement trait `From`: + as From>> + as From> + as From> as From<&Cookie<'_>>> + as From<&Referrer>> as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> + as From<&Hsts>> and $N others = note: required for `u8` to implement `Into>` note: required by a bound in `rocket::Response::<'r>::set_header` @@ -85,14 +85,14 @@ error[E0277]: the trait bound `Header<'_>: From` is not sat | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | = help: the following other types implement trait `From`: + as From>> + as From> + as From> as From<&Cookie<'_>>> + as From<&Referrer>> as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> + as From<&Hsts>> and $N others = note: required for `std::string::String` to implement `Into>` note: required by a bound in `rocket::Response::<'r>::set_header` @@ -110,14 +110,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` | = help: the following other types implement trait `Responder<'r, 'o>`: - <&'o [u8] as Responder<'r, 'o>> - <&'o str as Responder<'r, 'o>> - <() as Responder<'r, 'static>> - <(ContentType, R) as Responder<'r, 'o>> - <(Status, R) as Responder<'r, 'o>> - as Responder<'r, 'o>> - as Responder<'r, 'static>> - as Responder<'r, 'static>> + > + > + > + > + as Responder<'r, 'o>> + as Responder<'r, 'static>> + as Responder<'r, 'static>> + as Responder<'r, 'o>> and $N others note: required by a bound in `route::handler::, Status, (rocket::Data<'o>, Status)>>::from` --> $WORKSPACE/core/lib/src/route/handler.rs diff --git a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr index 3aa69ad545..4339650ca5 100644 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr @@ -5,14 +5,14 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied | ^ the trait `FromParam<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromParam<'a>`: - &'a str - IpAddr - Ipv4Addr - Ipv6Addr - NonZeroI128 - NonZeroI16 - NonZeroI32 - NonZeroI64 + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied @@ -22,10 +22,10 @@ error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied | ^ the trait `FromSegments<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromSegments<'r>`: - > - >::Error> as FromSegments<'r>> as FromSegments<'r>> + > as FromSegments<'r>> + >::Error> as FromSegments<'r>> error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:12:12 @@ -34,14 +34,14 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied | ^ the trait `FromFormField<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others = note: required for `Q` to implement `FromForm<'_>` @@ -52,14 +52,14 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied | ^ the trait `FromFormField<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromFormField<'v>`: - &'v [u8] - &'v str - Capped<&'v [u8]> - Capped<&'v str> - Capped> - Capped> - Capped - Cow<'v, str> + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others = note: required for `Q` to implement `FromForm<'_>` @@ -70,14 +70,14 @@ error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied | ^ the trait `FromData<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromData<'r>`: - &'r RawStr - &'r [u8] - &'r str - Capped<&'r RawStr> - Capped<&'r [u8]> - Capped<&'r str> + rocket::Data<'r> + Cow<'_, str> Capped> + Capped> Capped> + Capped + Capped<&'r str> + Capped<&'r RawStr> and $N others error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied @@ -87,14 +87,14 @@ error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied | ^ the trait `FromRequest<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromRequest<'r>`: - &'r ContentType - &'r Host<'r> - &'r Limits - &'r Route - &'r rocket::Config - &'r rocket::State - &'r rocket::http::Accept - &'r rocket::http::CookieJar<'r> + rocket::http::Method + Outcome>::Error), Status> + Flash<&'r rocket::http::CookieJar<'r>> + rocket::Shutdown + IpAddr + std::net::SocketAddr + std::option::Option + Result>::Error> and $N others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied @@ -104,14 +104,14 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied | ^ the trait `FromParam<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromParam<'a>`: - &'a str - IpAddr - Ipv4Addr - Ipv6Addr - NonZeroI128 - NonZeroI16 - NonZeroI32 - NonZeroI64 + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied @@ -121,14 +121,14 @@ error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied | ^ the trait `FromRequest<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromRequest<'r>`: - &'r ContentType - &'r Host<'r> - &'r Limits - &'r Route - &'r rocket::Config - &'r rocket::State - &'r rocket::http::Accept - &'r rocket::http::CookieJar<'r> + rocket::http::Method + Outcome>::Error), Status> + Flash<&'r rocket::http::CookieJar<'r>> + rocket::Shutdown + IpAddr + std::net::SocketAddr + std::option::Option + Result>::Error> and $N others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied @@ -138,14 +138,14 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied | ^ the trait `FromParam<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromParam<'a>`: - &'a str - IpAddr - Ipv4Addr - Ipv6Addr - NonZeroI128 - NonZeroI16 - NonZeroI32 - NonZeroI64 + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied @@ -155,12 +155,12 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied | ^ the trait `FromParam<'_>` is not implemented for `Q` | = help: the following other types implement trait `FromParam<'a>`: - &'a str - IpAddr - Ipv4Addr - Ipv6Addr - NonZeroI128 - NonZeroI16 - NonZeroI32 - NonZeroI64 + bool + isize + i8 + i16 + i32 + i64 + i128 + usize and $N others diff --git a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr index 388e1f0875..a38f206c4c 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uri-bad-type.stderr @@ -17,9 +17,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:5 @@ -28,9 +28,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:5 @@ -39,9 +39,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:5 @@ -67,14 +67,14 @@ error[E0277]: the trait bound `S: FromUriParam` | ^ the trait `FromUriParam` is not implemented for `S` | = help: the following other types implement trait `FromUriParam`: - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied @@ -84,9 +84,9 @@ error[E0277]: the trait bound `i32: FromUriParam>` is not implemented for `i32` | = help: the following other types implement trait `FromUriParam`: + > > > - > = note: required for `std::option::Option` to implement `FromUriParam>` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied @@ -96,12 +96,12 @@ error[E0277]: the trait bound `std::string::String: FromUriParam>` is not implemented for `std::string::String` | = help: the following other types implement trait `FromUriParam`: + > + > + > > > > - > - > - > = note: required for `Result` to implement `FromUriParam>` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied @@ -111,9 +111,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: + > > > - > error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:5 @@ -122,9 +122,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: + > > > - > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:5 @@ -150,14 +150,14 @@ error[E0277]: the trait bound `S: FromUriParam | ^ the trait `FromUriParam` is not implemented for `S` | = help: the following other types implement trait `FromUriParam`: - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `S: FromUriParam` is not satisfied @@ -184,14 +184,14 @@ error[E0277]: the trait bound `S: FromUriParam | ^ the trait `FromUriParam` is not implemented for `S` | = help: the following other types implement trait `FromUriParam`: - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `S: Ignorable` is not satisfied @@ -201,8 +201,8 @@ error[E0277]: the trait bound `S: Ignorable` is n | ^ the trait `Ignorable` is not implemented for `S` | = help: the following other types implement trait `Ignorable

`: - Result std::option::Option + Result note: required by a bound in `assert_ignorable` --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | @@ -216,8 +216,8 @@ error[E0277]: the trait bound `usize: Ignorable` | ^ the trait `Ignorable` is not implemented for `usize` | = help: the following other types implement trait `Ignorable

`: - Result std::option::Option + Result note: required by a bound in `assert_ignorable` --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs | @@ -248,14 +248,14 @@ error[E0277]: the trait bound `S: FromUriParam | ^ the trait `FromUriParam` is not implemented for `S` | = help: the following other types implement trait `FromUriParam`: - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a std::path::Path as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied @@ -265,9 +265,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:15 @@ -279,8 +279,8 @@ error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefi | required by a bound introduced by this call | = help: the following other types implement trait `ValidRoutePrefix`: - rocket::http::uri::Absolute<'a> rocket::http::uri::Origin<'a> + rocket::http::uri::Absolute<'a> note: required by a bound in `RouteUriBuilder::with_prefix` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | @@ -294,9 +294,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:15 @@ -308,8 +308,8 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is | required by a bound introduced by this call | = help: the following other types implement trait `ValidRoutePrefix`: - rocket::http::uri::Absolute<'a> rocket::http::uri::Origin<'a> + rocket::http::uri::Absolute<'a> note: required by a bound in `RouteUriBuilder::with_prefix` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | @@ -323,9 +323,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37 @@ -337,13 +337,15 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix`: - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> as ValidRouteSuffix>> + as ValidRouteSuffix>> + as ValidRouteSuffix>> + as ValidRouteSuffix>> note: required by a bound in `RouteUriBuilder::with_suffix` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` @@ -354,9 +356,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > > + > + > error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:37 @@ -368,13 +370,15 @@ error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix`: - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> as ValidRouteSuffix>> + as ValidRouteSuffix>> + as ValidRouteSuffix>> + as ValidRouteSuffix>> note: required by a bound in `RouteUriBuilder::with_suffix` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` diff --git a/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr index e4726047ec..f7ae1881e5 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uris-invalid-syntax.stderr @@ -96,7 +96,7 @@ error: unexpected token 27 | uri!(simple: id = ); | ^ -error: unexpected end of input, expected expression +error: unexpected end of input, expected an expression --> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:28:22 | 28 | uri!(simple(id = )); diff --git a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr index 0613f5aa5d..fb9c378940 100644 --- a/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr @@ -5,14 +5,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` @@ -28,14 +28,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` @@ -51,14 +51,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` @@ -74,14 +74,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden @@ -99,14 +99,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden @@ -124,14 +124,14 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden @@ -149,14 +149,14 @@ error[E0277]: the trait bound `BadType: UriDisplay | ^^^^^^^ the trait `UriDisplay` is not implemented for `BadType` | = help: the following other types implement trait `UriDisplay

`: - <&T as UriDisplay

> - <&mut T as UriDisplay

> - as UriDisplay> - > - > - > - > - > + > + > + > + > + > + > + > + > and $N others = note: required for `&BadType` to implement `UriDisplay` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` diff --git a/core/codegen/tests/ui-fail-stable/async-entry.stderr b/core/codegen/tests/ui-fail-stable/async-entry.stderr index 0a3f5557de..d3ac4cc7af 100644 --- a/core/codegen/tests/ui-fail-stable/async-entry.stderr +++ b/core/codegen/tests/ui-fail-stable/async-entry.stderr @@ -27,7 +27,7 @@ error: [note] this function must be `async` | ^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function + = note: this attribute generates a `main` function --> tests/ui-fail-stable/async-entry.rs:49:5 | 49 | #[rocket::launch] @@ -70,7 +70,7 @@ error: [note] this function must return a value | ^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function + = note: this attribute generates a `main` function --> tests/ui-fail-stable/async-entry.rs:79:5 | 79 | #[rocket::launch] @@ -85,7 +85,7 @@ error: [note] this function cannot be `main` | ^^^^ error: attribute cannot be applied to `main` function - --- note: this attribute generates a `main` function + = note: this attribute generates a `main` function --> tests/ui-fail-stable/async-entry.rs:87:5 | 87 | #[rocket::launch] @@ -100,12 +100,12 @@ error: [note] this function cannot be `main` | ^^^^ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> tests/ui-fail-stable/async-entry.rs:73:41 + --> tests/ui-fail-stable/async-entry.rs:73:42 | 72 | fn rocket() -> _ { | ------ this is not `async` 73 | let _ = rocket::build().launch().await; - | ^^^^^^ only allowed inside `async` functions and blocks + | ^^^^^ only allowed inside `async` functions and blocks error[E0277]: `main` has invalid return type `Rocket` --> tests/ui-fail-stable/async-entry.rs:94:20 @@ -118,8 +118,11 @@ error[E0277]: `main` has invalid return type `Rocket` error[E0308]: mismatched types --> tests/ui-fail-stable/async-entry.rs:35:9 | +33 | async fn rocket() -> String { + | ------ expected `std::string::String` because of return type +34 | let _ = rocket::build().launch().await; 35 | rocket::build() - | ^^^^^^^^^^^^^^^ expected struct `String`, found struct `Rocket` + | ^^^^^^^^^^^^^^^ expected `String`, found `Rocket` | = note: expected struct `std::string::String` found struct `Rocket` @@ -127,8 +130,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> tests/ui-fail-stable/async-entry.rs:44:9 | +42 | async fn rocket() -> _ { + | - expected `Rocket` because of return type +43 | let _ = rocket::build().launch().await; 44 | "hi".to_string() - | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `String` + | ^^^^^^^^^^^^^^^^ expected `Rocket`, found `String` | = note: expected struct `Rocket` found struct `std::string::String` @@ -145,15 +151,25 @@ error[E0308]: mismatched types 26 | | } | | ^- help: consider using a semicolon here: `;` | |_____| - | expected `()`, found struct `Rocket` + | expected `()`, found `Rocket` | = note: expected unit type `()` found struct `Rocket` -error[E0277]: `main` has invalid return type `Rocket` - --> tests/ui-fail-stable/async-entry.rs:94:20 +error[E0308]: mismatched types + --> tests/ui-fail-stable/async-entry.rs:35:9 | -94 | async fn main() -> rocket::Rocket { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` can only return types that implement `Termination` +35 | rocket::build() + | ^^^^^^^^^^^^^^^ expected `String`, found `Rocket` | - = help: consider using `()`, or a `Result` + = note: expected struct `std::string::String` + found struct `Rocket` + +error[E0308]: mismatched types + --> tests/ui-fail-stable/async-entry.rs:44:9 + | +44 | "hi".to_string() + | ^^^^^^^^^^^^^^^^ expected `Rocket`, found `String` + | + = note: expected struct `Rocket` + found struct `std::string::String` diff --git a/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr b/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr index 9a79954b83..efb913cf13 100644 --- a/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr +++ b/core/codegen/tests/ui-fail-stable/bad-ignored-segments.stderr @@ -1,12 +1,12 @@ error: parameter must be named - --- help: use a name such as `_guard` or `_param` + = help: use a name such as `_guard` or `_param` --> 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` + = help: use a name such as `_guard` or `_param` --> tests/ui-fail-stable/bad-ignored-segments.rs:9:21 | 9 | #[post("/d", data = "<_>")] diff --git a/core/codegen/tests/ui-fail-stable/catch.stderr b/core/codegen/tests/ui-fail-stable/catch.stderr index bf3e312944..fdb47184a9 100644 --- a/core/codegen/tests/ui-fail-stable/catch.stderr +++ b/core/codegen/tests/ui-fail-stable/catch.stderr @@ -1,54 +1,54 @@ error: expected `fn` - --- help: `#[catch]` can only be used on functions + = help: `#[catch]` can only be used on functions --> tests/ui-fail-stable/catch.rs:6:1 | 6 | struct Catcher(String); | ^^^^^^ error: expected `fn` - --- help: `#[catch]` can only be used on functions + = help: `#[catch]` can only be used on functions --> 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)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> 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)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> 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)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> tests/ui-fail-stable/catch.rs:17:9 | 17 | #[catch(code = 404)] | ^^^^ error: status must be in range [100, 599] - --- help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> 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)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> 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)]` + = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` --> tests/ui-fail-stable/catch.rs:26:14 | 26 | #[catch(400, message = "foo")] @@ -60,7 +60,7 @@ error[E0308]: arguments to this function are incorrect 30 | fn f3(_request: &Request, other: bool) { } | ^^ - ---- an argument of type `bool` is missing | | - | argument of type `Status` unexpected + | unexpected argument of type `Status` | note: function defined here --> tests/ui-fail-stable/catch.rs:30:4 diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index 4ef0d317a4..3bc006df65 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -69,7 +69,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:28:20 | 28 | #[field(name = "isindex")] @@ -300,7 +300,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:111:20 | 111 | #[field(name = "hello&world")] @@ -315,7 +315,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:117:20 | 117 | #[field(name = "!@#$%^&*()_")] @@ -330,7 +330,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:123:20 | 123 | #[field(name = "?")] @@ -345,7 +345,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:129:20 | 129 | #[field(name = "")] @@ -360,7 +360,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:135:20 | 135 | #[field(name = "a&b")] @@ -375,7 +375,7 @@ 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: invalid form field name - --- help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' + = help: field name cannot be `isindex` or contain '&', '=', '?', '.', '[', ']' --> tests/ui-fail-stable/from_form.rs:141:20 | 141 | #[field(name = "a=")] @@ -404,7 +404,7 @@ 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 default field expression - --- help: at most one `default` or `default_with` is allowed + = help: at most one `default` or `default_with` is allowed --> tests/ui-fail-stable/from_form.rs:184:23 | 184 | #[field(default = 2)] @@ -419,7 +419,7 @@ 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 default expressions - --- help: only one of `default` or `default_with` must be used + = help: only one of `default` or `default_with` must be used --> tests/ui-fail-stable/from_form.rs:190:23 | 190 | #[field(default = 1, default_with = None)] @@ -440,7 +440,7 @@ 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 default expressions - --- help: only one of `default` or `default_with` must be used + = help: only one of `default` or `default_with` must be used --> tests/ui-fail-stable/from_form.rs:197:23 | 197 | #[field(default = 1)] @@ -464,7 +464,7 @@ error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:147:24 | 147 | #[field(validate = 123)] - | ^^^ expected enum `Result`, found integer + | ^^^ expected `Result<(), Errors<'_>>`, found integer | = note: expected enum `Result<(), Errors<'_>>` found type `{integer}` @@ -481,7 +481,7 @@ error[E0308]: mismatched types 159 | #[field(validate = ext(rocket::http::ContentType::HTML))] | --- arguments to this function are incorrect 160 | first: String, - | ^^^^^^ expected enum `TempFile`, found struct `String` + | ^^^^^^ expected `&TempFile<'_>`, found `&String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -495,9 +495,9 @@ error[E0308]: arguments to this function are incorrect --> tests/ui-fail-stable/from_form.rs:165:24 | 165 | #[field(validate = ext("hello"))] - | ^^^ ------- expected struct `ContentType`, found `&str` + | ^^^ ------- expected `ContentType`, found `&str` 166 | first: String, - | ------ expected enum `TempFile`, found struct `String` + | ------ expected `&TempFile<'_>`, found `&String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -513,7 +513,7 @@ error[E0308]: mismatched types 171 | #[field(default = 123)] | ^^^- help: try using a conversion method: `.to_string()` | | - | expected struct `String`, found integer + | expected `String`, found integer | arguments to this enum variant are incorrect | help: the type constructed contains `{integer}` due to the type of the argument passed @@ -533,7 +533,7 @@ error[E0308]: mismatched types 203 | #[field(default_with = Some("hi"))] | ---- ^^^^- help: try using a conversion method: `.to_string()` | | | - | | expected struct `String`, found `&str` + | | expected `String`, found `&str` | arguments to this enum variant are incorrect | help: the type constructed contains `&'static str` due to the type of the argument passed diff --git a/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr b/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr index 9ae9ff9968..e8416f8d69 100644 --- a/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/route-attribute-general-syntax.stderr @@ -7,28 +7,28 @@ 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` - --- help: #[get] can only be used on functions + = help: #[get] can only be used on functions --> 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 + = help: #[get] can only be used on functions --> 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 + = help: #[get] can only be used on functions --> 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 + = help: #[get] can only be used on functions --> tests/ui-fail-stable/route-attribute-general-syntax.rs:18:1 | 18 | impl S { } @@ -65,7 +65,7 @@ error: expected key/value `key = value` | ^ error: handler arguments must be named - --- help: to name an ignored handler argument, use `_name` + = help: to name an ignored handler argument, use `_name` --> tests/ui-fail-stable/route-attribute-general-syntax.rs:39:7 | 39 | fn c1(_: usize) {} @@ -168,35 +168,35 @@ error: invalid or unknown media type | ^^^^^^^^^^^ error: invalid HTTP method for route handlers - --- help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` + = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` --> 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` + = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` --> 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` + = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` --> 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` + = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` --> 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` + = help: method must be one of: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`, `OPTIONS` --> tests/ui-fail-stable/route-attribute-general-syntax.rs:107:9 | 107 | #[route(120, "/")] diff --git a/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr b/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr index c48ccadc01..b1306d15e8 100644 --- a/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/route-path-bad-syntax.stderr @@ -1,47 +1,47 @@ error: invalid route URI: expected token '/' but found 'a' at index 0 - --- help: expected URI in origin form: "/path/" + = help: expected URI in origin form: "/path/" --> 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/" + = help: expected URI in origin form: "/path/" --> 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/" + = help: expected URI in origin form: "/path/" --> 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" + = note: expected "/a/b", found "/a///b" --> 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&&" + = note: expected "/?bat", found "/?bat&&" --> 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&&" + = note: expected "/?bat", found "/?bat&&" --> 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//" + = note: expected "/a/b", found "/a/b//" --> tests/ui-fail-stable/route-path-bad-syntax.rs:23:7 | 23 | #[get("/a/b//")] @@ -108,68 +108,68 @@ error: [note] expected argument named `b` here | ^^ error: invalid identifier: `foo_.` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? + = help: dynamic parameters must be valid identifiers + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:60:7 | 60 | #[get("/")] | ^^^^^^^^^^ error: invalid identifier: `foo*` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? + = help: dynamic parameters must be valid identifiers + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:63:7 | 63 | #[get("/")] | ^^^^^^^^^ error: invalid identifier: `!` - --- help: dynamic parameters must be valid identifiers - --- help: did you mean ``? + = help: dynamic parameters must be valid identifiers + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:66:7 | 66 | #[get("/")] | ^^^^^^ error: invalid identifier: `name>:`? + = help: dynamic parameters must be valid identifiers + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:69:7 | 69 | #[get("/:")] | ^^^^^^^^^^^^^^ error: unexpected static parameter - --- help: parameter must be dynamic: `` + = help: parameter must be dynamic: `` --> tests/ui-fail-stable/route-path-bad-syntax.rs:74:19 | 74 | #[get("/", data = "foo")] | ^^^^^ error: parameter cannot be trailing - --- help: did you mean ``? + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:77:19 | 77 | #[get("/", data = "")] | ^^^^^^^^^ error: unexpected static parameter - --- help: parameter must be dynamic: `` + = help: parameter must be dynamic: `` --> tests/ui-fail-stable/route-path-bad-syntax.rs:80:19 | 80 | #[get("/", data = "`? + = help: dynamic parameters must be valid identifiers + = help: did you mean ``? --> tests/ui-fail-stable/route-path-bad-syntax.rs:83:19 | 83 | #[get("/", data = "")] | ^^^^^^^^^ error: handler arguments must be named - --- help: to name an ignored handler argument, use `_name` + = help: to name an ignored handler argument, use `_name` --> tests/ui-fail-stable/route-path-bad-syntax.rs:89:7 | 89 | fn k0(_: usize) {} diff --git a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr index bf39d7217d..96b26ef433 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr @@ -2,13 +2,13 @@ error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected enum `Infallible`, found `&str` + | ^^^^^^ expected `Infallible`, found `&str` error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected `&str`, found enum `Infallible` + | ^^^^^^ expected `&str`, found `Infallible` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:45:22 @@ -273,6 +273,8 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` @@ -303,5 +305,7 @@ error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr index 87e3ed4d14..0be0fb233e 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr @@ -5,21 +5,21 @@ error: expected identifier, found keyword `_` | ^ error: route expects 1 parameter but 2 were supplied - --- note: route `ignored` has uri "/<_>" + = note: route `ignored` has uri "/<_>" --> tests/ui-fail-stable/typed-uris-bad-params.rs:69:18 | 69 | uri!(ignored(10, "10")); | ^^ error: expected unnamed arguments due to ignored parameters - --- note: uri for route `ignored` ignores path parameters: "/<_>" + = note: uri for route `ignored` ignores path parameters: "/<_>" --> tests/ui-fail-stable/typed-uris-bad-params.rs:67:18 | 67 | uri!(ignored(num = 10)); | ^^^ error: route expects 1 parameter but 2 were supplied - --- note: route `ignored` has uri "/<_>" + = note: route `ignored` has uri "/<_>" --> tests/ui-fail-stable/typed-uris-bad-params.rs:65:18 | 65 | uri!(ignored(10, 20)); @@ -44,8 +44,8 @@ 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` + = note: uri parameters are: id: i32, name: String + = help: missing parameter: `name` --> tests/ui-fail-stable/typed-uris-bad-params.rs:55:18 | 55 | uri!(has_two(id = 100, cookies = "hi")); @@ -58,8 +58,8 @@ 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` + = note: uri parameters are: id: i32, name: String + = help: missing parameter: `name` --> tests/ui-fail-stable/typed-uris-bad-params.rs:53:18 | 53 | uri!(has_two(cookies = "hi", id = 100, id = 10, id = 10)); @@ -78,16 +78,16 @@ 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` + = note: uri parameters are: id: i32, name: String + = help: missing parameter: `id` --> tests/ui-fail-stable/typed-uris-bad-params.rs:51:18 | 51 | uri!(has_two(name = "hi")); | ^^^^ error: invalid parameters for `has_two` route uri - --- note: uri parameters are: id: i32, name: String - --- help: missing parameter: `name` + = note: uri parameters are: id: i32, name: String + = help: missing parameter: `name` --> tests/ui-fail-stable/typed-uris-bad-params.rs:49:18 | 49 | uri!(has_two(id = 100, id = 100, )); @@ -100,7 +100,7 @@ error: [help] duplicate parameter: `id` | ^^ error: invalid parameters for `has_one_guarded` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:47:26 | 47 | uri!(has_one_guarded(id = 100, cookies = "hi")); @@ -113,7 +113,7 @@ error: [help] unknown parameter: `cookies` | ^^^^^^^ error: invalid parameters for `has_one_guarded` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:45:26 | 45 | uri!(has_one_guarded(cookies = "hi", id = 100)); @@ -126,8 +126,8 @@ error: [help] unknown parameter: `cookies` | ^^^^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 - --- help: missing parameter: `id` + = note: uri parameters are: id: i32 + = help: missing parameter: `id` --> tests/ui-fail-stable/typed-uris-bad-params.rs:43:18 | 43 | uri!(has_one(name = "hi")); @@ -140,7 +140,7 @@ error: [help] unknown parameter: `name` | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:41:18 | 41 | uri!(has_one(id = 100, id = 100, )); @@ -153,7 +153,7 @@ error: [help] duplicate parameter: `id` | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:39:18 | 39 | uri!(has_one(id = 100, id = 100)); @@ -166,7 +166,7 @@ error: [help] duplicate parameter: `id` | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:37:18 | 37 | uri!(has_one(name = 100, age = 50, id = 100, id = 50)); @@ -185,7 +185,7 @@ error: [help] duplicate parameter: `id` | ^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:35:18 | 35 | uri!(has_one(name = 100, age = 50, id = 100)); @@ -198,7 +198,7 @@ error: [help] unknown parameters: `name`, `age` | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:33:18 | 33 | uri!(has_one(name = 100, id = 100)); @@ -211,7 +211,7 @@ error: [help] unknown parameter: `name` | ^^^^ error: invalid parameters for `has_one` route uri - --- note: uri parameters are: id: i32 + = note: uri parameters are: id: i32 --> tests/ui-fail-stable/typed-uris-bad-params.rs:31:18 | 31 | uri!(has_one(id = 100, name = "hi")); @@ -224,49 +224,49 @@ error: [help] unknown parameter: `name` | ^^^^ error: route expects 2 parameters but 1 was supplied - --- note: route `has_two` has uri "/?" + = note: route `has_two` has uri "/?" --> 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 "/?" + = note: route `has_two` has uri "/?" --> 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 "/" + = note: route `has_one_guarded` has uri "/" --> 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 "/" + = note: route `has_one` has uri "/" --> 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 "/" + = note: route `has_one` has uri "/" --> 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 "/" + = note: route `has_one` has uri "/" --> 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 "/" + = note: route `has_one` has uri "/" --> tests/ui-fail-stable/typed-uris-bad-params.rs:21:10 | 21 | uri!(has_one); @@ -276,10 +276,10 @@ error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected enum `Infallible`, found `&str` + | ^^^^^^ expected `Infallible`, found `&str` error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected `&str`, found enum `Infallible` + | ^^^^^^ expected `&str`, found `Infallible` diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr index d50a6ab337..00b70d540a 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-invalid-syntax.stderr @@ -96,7 +96,7 @@ error: unexpected token 27 | uri!(simple: id = ); | ^ -error: unexpected end of input, expected expression +error: unexpected end of input, expected an expression --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:28:22 | 28 | uri!(simple(id = )); @@ -145,7 +145,7 @@ error: URI suffix must contain only query and/or fragment | ^^^^^^^^^ error: route expects 2 parameters but 0 were supplied - --- note: route `simple` has uri "//" + = note: route `simple` has uri "//" --> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:13:10 | 13 | uri!(simple,);