From e468a98333985f612544d0ea11b6a2cf0d120889 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 30 Jan 2023 16:05:44 -0800 Subject: [PATCH] Update UI tests for latest stable, nightly. --- .../ui-fail-nightly/database-types.stderr | 22 +- .../ui-fail-nightly/database-types.stderr | 80 ++--- .../tests/ui-fail-nightly/async-entry.stderr | 16 +- .../ui-fail-nightly/catch_type_errors.stderr | 10 +- .../tests/ui-fail-nightly/from_form.stderr | 20 +- .../ui-fail-nightly/responder-types.stderr | 162 ++++----- .../ui-fail-nightly/typed-uri-bad-type.stderr | 319 +++++++----------- .../typed-uris-bad-params.stderr | 4 +- .../uri_display_type_errors.stderr | 292 ++++++++-------- .../tests/ui-fail-stable/from_form.stderr | 31 +- .../route-attribute-general-syntax.stderr | 2 +- .../ui-fail-stable/typed-uri-bad-type.stderr | 131 ++----- 12 files changed, 476 insertions(+), 613 deletions(-) diff --git a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr index 2be0fb4a..d899eb5c 100644 --- a/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr +++ b/contrib/db_pools/codegen/tests/ui-fail-nightly/database-types.stderr @@ -1,15 +1,15 @@ error[E0277]: the trait bound `Unknown: Pool` is not satisfied - --> tests/ui-fail-nightly/database-types.rs:7:10 - | -7 | struct A(Unknown); - | ^^^^^^^ the trait `Pool` is not implemented for `Unknown` - | - = help: the trait `Pool` is implemented for `deadpool::managed::Pool` + --> tests/ui-fail-nightly/database-types.rs:7:10 + | +7 | struct A(Unknown); + | ^^^^^^^ the trait `Pool` is not implemented for `Unknown` + | + = help: the trait `Pool` is implemented for `deadpool::managed::Pool` 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` + --> $WORKSPACE/contrib/db_pools/lib/src/database.rs + | + | type Pool: Pool; + | ^^^^ required by this bound in `Database::Pool` error[E0277]: the trait bound `Vec: Pool` is not satisfied --> tests/ui-fail-nightly/database-types.rs:11:10 @@ -22,4 +22,4 @@ 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 `Database::Pool` 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 f170223d..1e4e92ac 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 @@ -1,51 +1,51 @@ error[E0277]: the trait bound `Unknown: Poolable` is not satisfied - --> tests/ui-fail-nightly/database-types.rs:6:10 - | -6 | struct A(Unknown); - | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` - | - = help: the trait `Poolable` is implemented for `SqliteConnection` + --> tests/ui-fail-nightly/database-types.rs:6:10 + | +6 | struct A(Unknown); + | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` + | + = help: the trait `Poolable` is implemented for `SqliteConnection` note: required by a bound in `rocket_sync_db_pools::Connection` - --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs - | - | pub struct Connection { - | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs + | + | pub struct Connection { + | ^^^^^^^^ required by this bound in `Connection` error[E0277]: the trait bound `Vec: Poolable` is not satisfied - --> tests/ui-fail-nightly/database-types.rs:9:10 - | -9 | struct B(Vec); - | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` - | - = help: the trait `Poolable` is implemented for `SqliteConnection` + --> tests/ui-fail-nightly/database-types.rs:9:10 + | +9 | struct B(Vec); + | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` + | + = help: the trait `Poolable` is implemented for `SqliteConnection` note: required by a bound in `rocket_sync_db_pools::Connection` - --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs - | - | pub struct Connection { - | ^^^^^^^^ required by this bound in `rocket_sync_db_pools::Connection` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs + | + | pub struct Connection { + | ^^^^^^^^ required by this bound in `Connection` error[E0277]: the trait bound `Unknown: Poolable` is not satisfied - --> tests/ui-fail-nightly/database-types.rs:6:10 - | -6 | struct A(Unknown); - | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` - | - = help: the trait `Poolable` is implemented for `SqliteConnection` + --> tests/ui-fail-nightly/database-types.rs:6:10 + | +6 | struct A(Unknown); + | ^^^^^^^ the trait `Poolable` is not implemented for `Unknown` + | + = help: the trait `Poolable` is implemented for `SqliteConnection` note: required by a bound in `ConnectionPool` - --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs - | - | pub struct ConnectionPool { - | ^^^^^^^^ required by this bound in `ConnectionPool` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs + | + | pub struct ConnectionPool { + | ^^^^^^^^ required by this bound in `ConnectionPool` error[E0277]: the trait bound `Vec: Poolable` is not satisfied - --> tests/ui-fail-nightly/database-types.rs:9:10 - | -9 | struct B(Vec); - | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` - | - = help: the trait `Poolable` is implemented for `SqliteConnection` + --> tests/ui-fail-nightly/database-types.rs:9:10 + | +9 | struct B(Vec); + | ^^^^^^^^ the trait `Poolable` is not implemented for `Vec` + | + = help: the trait `Poolable` is implemented for `SqliteConnection` note: required by a bound in `ConnectionPool` - --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs - | - | pub struct ConnectionPool { - | ^^^^^^^^ required by this bound in `ConnectionPool` + --> $WORKSPACE/contrib/sync_db_pools/lib/src/connection.rs + | + | pub struct ConnectionPool { + | ^^^^^^^^ required by this bound in `ConnectionPool` diff --git a/core/codegen/tests/ui-fail-nightly/async-entry.stderr b/core/codegen/tests/ui-fail-nightly/async-entry.stderr index 3949b02f..85ac875f 100644 --- a/core/codegen/tests/ui-fail-nightly/async-entry.stderr +++ b/core/codegen/tests/ui-fail-nightly/async-entry.stderr @@ -117,7 +117,7 @@ error[E0308]: mismatched types --> tests/ui-fail-nightly/async-entry.rs:35:9 | 35 | rocket::build() - | ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket` + | ^^^^^^^^^^^^^^^ expected struct `String`, found struct `Rocket` | = note: expected struct `std::string::String` found struct `Rocket` @@ -126,7 +126,7 @@ error[E0308]: mismatched types --> tests/ui-fail-nightly/async-entry.rs:44:9 | 44 | "hi".to_string() - | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String` + | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `String` | = note: expected struct `Rocket` found struct `std::string::String` @@ -147,18 +147,6 @@ error[E0308]: mismatched types = note: expected unit type `()` found struct `Rocket` -error[E0308]: mismatched types - --> tests/ui-fail-nightly/async-entry.rs:33:26 - | -33 | async fn rocket() -> String { - | ^^^^^^ - | | - | expected struct `Rocket`, found struct `std::string::String` - | expected due to this - | - = 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 | 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 48aca92c..1f46c0f9 100644 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr @@ -15,7 +15,7 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 40 others + and $N others error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/catch_type_errors.rs:11:30 @@ -34,13 +34,13 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 40 others + and $N others error[E0308]: mismatched types --> tests/ui-fail-nightly/catch_type_errors.rs:16:17 | 16 | fn f3(_request: bool) -> usize { - | -- ^^^^ expected `bool`, found `&rocket::Request<'_>` + | -- ^^^^ expected `bool`, found `&Request<'_>` | | | arguments to this function are incorrect | @@ -67,7 +67,7 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 40 others + and $N others error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/catch_type_errors.rs:21:12 @@ -86,4 +86,4 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 40 others + and $N others diff --git a/core/codegen/tests/ui-fail-nightly/from_form.stderr b/core/codegen/tests/ui-fail-nightly/from_form.stderr index c3e4ad77..66b42d2d 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form.stderr @@ -449,7 +449,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 `std::string::String` + | ^^^^^^ expected enum `TempFile`, found struct `String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -465,7 +465,7 @@ error[E0308]: arguments to this function are incorrect 165 | #[field(validate = ext("hello"))] | ^^^ ------- expected struct `ContentType`, found `&str` 166 | first: String, - | ------ expected enum `TempFile`, found struct `std::string::String` + | ------ expected enum `TempFile`, found struct `String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -481,9 +481,14 @@ error[E0308]: mismatched types 171 | #[field(default = 123)] | ^^^- help: try using a conversion method: `.to_string()` | | - | expected struct `std::string::String`, found integer + | expected struct `String`, found integer | arguments to this enum variant are incorrect | +help: the type constructed contains `{integer}` due to the type of the argument passed + --> tests/ui-fail-nightly/from_form.rs:171:23 + | +171 | #[field(default = 123)] + | ^^^ this argument influences the type of `Some` note: tuple variant defined here --> $RUST/core/src/option.rs | @@ -496,9 +501,16 @@ error[E0308]: mismatched types 203 | #[field(default_with = Some("hi"))] | ---- ^^^^- help: try using a conversion method: `.to_string()` | | | - | | expected struct `std::string::String`, found `&str` + | | expected struct `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 + --> tests/ui-fail-nightly/from_form.rs:203:28 + | +203 | #[field(default_with = Some("hi"))] + | ^^^^^----^ + | | + | this argument influences the type of `Some` note: tuple variant defined here --> $RUST/core/src/option.rs | diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr index 45974a57..6885bc43 100644 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder-types.stderr @@ -13,30 +13,30 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 44 others + and $N others error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:11:5 - | -11 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following other types implement trait `From`: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> - and 4 others - = note: required for `u8` to implement `Into>` + --> tests/ui-fail-nightly/responder-types.rs:11:5 + | +11 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following other types implement trait `From`: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and $N others + = note: required for `u8` to implement `Into>` 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>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `rocket::Response::<'r>::set_header` + --> $WORKSPACE/core/lib/src/response/response.rs + | + | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { + | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/responder-types.rs:16:5 @@ -53,72 +53,72 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied as Responder<'r, 'o>> as Responder<'r, 'static>> as Responder<'r, 'static>> - and 44 others + and $N others error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:17:5 - | -17 | other: u8, - | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following other types implement trait `From`: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> - and 4 others - = note: required for `u8` to implement `Into>` + --> tests/ui-fail-nightly/responder-types.rs:17:5 + | +17 | other: u8, + | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following other types implement trait `From`: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and $N others + = note: required for `u8` to implement `Into>` 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>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `rocket::Response::<'r>::set_header` + --> $WORKSPACE/core/lib/src/response/response.rs + | + | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { + | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` error[E0277]: the trait bound `Header<'_>: From` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:24:5 - | -24 | then: String, - | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` - | - = help: the following other types implement trait `From`: - as From<&Cookie<'_>>> - as From<&ExpectCt>> - as From<&Frame>> - as From<&Hsts>> - as From<&NoSniff>> - as From<&Permission>> - as From<&Prefetch>> - as From<&Referrer>> - and 4 others - = note: required for `std::string::String` to implement `Into>` + --> tests/ui-fail-nightly/responder-types.rs:24:5 + | +24 | then: String, + | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` + | + = help: the following other types implement trait `From`: + as From<&Cookie<'_>>> + as From<&ExpectCt>> + as From<&Frame>> + as From<&Hsts>> + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and $N others + = note: required for `std::string::String` to implement `Into>` 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>>(&mut self, header: H) -> bool { - | ^^^^^^^^^^^^^^^^ required by this bound in `rocket::Response::<'r>::set_header` + --> $WORKSPACE/core/lib/src/response/response.rs + | + | pub fn set_header<'h: 'r, H: Into>>(&mut self, header: H) -> bool { + | ^^^^^^^^^^^^^^^^ required by this bound in `Response::<'r>::set_header` error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/responder-types.rs:28:13 - | -28 | fn foo() -> usize { 0 } - | ^^^^^ 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>> - and 44 others + --> tests/ui-fail-nightly/responder-types.rs:28:13 + | +28 | fn foo() -> usize { 0 } + | ^^^^^ 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>> + and $N others note: required by a bound in `route::handler::, Status, rocket::Data<'o>>>::from` - --> $WORKSPACE/core/lib/src/route/handler.rs - | - | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { - | ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::, Status, rocket::Data<'o>>>::from` + --> $WORKSPACE/core/lib/src/route/handler.rs + | + | pub fn from>(req: &'r Request<'_>, responder: R) -> Outcome<'r> { + | ^^^^^^^^^^^^^^^^^ required by this bound in `route::handler::, Status, Data<'o>>>::from` 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 3b6dd8d3..b29aeb67 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 @@ -1,10 +1,10 @@ -error[E0271]: type mismatch resolving `>::Error == &str` +error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` -error[E0271]: type mismatch resolving `>::Error == &str` +error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } @@ -17,15 +17,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:17 @@ -34,15 +28,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:22 @@ -51,15 +39,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:30 @@ -76,7 +58,7 @@ error[E0277]: the trait bound `S: FromUriParam` <&'a std::path::Path as FromUriParam> <&'a str as FromUriParam> <&'a str as FromUriParam> - and 155 others + and $N others error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:25 @@ -85,15 +67,9 @@ error[E0277]: the trait bound `i32: FromUriParam>` is not implemented for `i32` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > = note: required for `std::option::Option` to implement `FromUriParam>` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied @@ -103,15 +79,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`: - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> > > - and 4 others + > + > + > + > = note: required for `Result` to implement `FromUriParam>` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied @@ -121,15 +94,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:24 @@ -138,15 +105,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:23 @@ -163,7 +124,7 @@ error[E0277]: the trait bound `S: FromUriParam <&'a std::path::Path as FromUriParam> <&'a str as FromUriParam> <&'a str as FromUriParam> - and 155 others + and $N others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:25 @@ -180,37 +141,37 @@ error[E0277]: the trait bound `S: FromUriParam <&'a std::path::Path as FromUriParam> <&'a str as FromUriParam> <&'a str as FromUriParam> - and 155 others + and $N others error[E0277]: the trait bound `S: Ignorable` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25 - | -66 | uri!(other_q(rest = _, id = 100)); - | ^ the trait `Ignorable` is not implemented for `S` - | - = help: the following other types implement trait `Ignorable

`: - Result - std::option::Option + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25 + | +66 | uri!(other_q(rest = _, id = 100)); + | ^ the trait `Ignorable` is not implemented for `S` + | + = help: the following other types implement trait `Ignorable

`: + Result + std::option::Option note: required by a bound in `assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() { } - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs + | + | pub fn assert_ignorable>() { } + | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `usize: Ignorable` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:33 - | -68 | uri!(other_q(rest = S, id = _)); - | ^ the trait `Ignorable` is not implemented for `usize` - | - = help: the following other types implement trait `Ignorable

`: - Result - std::option::Option + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:33 + | +68 | uri!(other_q(rest = S, id = _)); + | ^ the trait `Ignorable` is not implemented for `usize` + | + = help: the following other types implement trait `Ignorable

`: + Result + std::option::Option note: required by a bound in `assert_ignorable` - --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs - | - | pub fn assert_ignorable>() { } - | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` + --> $WORKSPACE/core/http/src/uri/fmt/uri_display.rs + | + | pub fn assert_ignorable>() { } + | ^^^^^^^^^^^^ required by this bound in `assert_ignorable` error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:68:25 @@ -227,7 +188,7 @@ error[E0277]: the trait bound `S: FromUriParam <&'a std::path::Path as FromUriParam> <&'a str as FromUriParam> <&'a str as FromUriParam> - and 155 others + and $N others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:40 @@ -236,33 +197,27 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied - --> 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<'_>` - | 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> + --> 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<'_>` + | 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> note: required by a bound in `RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { + | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:78:33 @@ -271,33 +226,27 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied - --> 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` - | 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> + --> 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` + | 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> note: required by a bound in `RouteUriBuilder::with_prefix` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { - | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn with_prefix(self, p: P) -> PrefixedRouteUri { + | ^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_prefix` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:25 @@ -306,35 +255,29 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37 - | -81 | uri!(_, simple(id = "hi"), uri!("*")); - | -----^^^- - | | | - | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` - | required by a bound introduced by this call - | - = help: the following other types implement trait `ValidRouteSuffix`: - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:81:37 + | +81 | uri!(_, simple(id = "hi"), uri!("*")); + | -----^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Asterisk` + | required by a bound introduced by this call + | + = help: the following other types implement trait `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 - | - | where S: ValidRouteSuffix> - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:25 @@ -343,32 +286,26 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and 34 others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied - --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:37 - | -82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); - | -----^^^^^^^^^^- - | | | - | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` - | required by a bound introduced by this call - | - = help: the following other types implement trait `ValidRouteSuffix`: - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> - as ValidRouteSuffix>> + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:82:37 + | +82 | uri!(_, simple(id = "hi"), uri!("/foo/bar")); + | -----^^^^^^^^^^- + | | | + | | the trait `ValidRouteSuffix>` is not implemented for `rocket::http::uri::Origin<'_>` + | required by a bound introduced by this call + | + = help: the following other types implement trait `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 - | - | where S: ValidRouteSuffix> - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | where S: ValidRouteSuffix> + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` diff --git a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr index 9296bbf9..49f180ff 100644 --- a/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-nightly/typed-uris-bad-params.stderr @@ -281,13 +281,13 @@ error: route expects 1 parameter but 0 were supplied | = note: route `has_one` has uri "/" -error[E0271]: type mismatch resolving `>::Error == &str` +error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-nightly/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&str` -error[E0271]: type mismatch resolving `>::Error == &str` +error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-nightly/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } 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 d3731abd..0613f5aa 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 @@ -1,166 +1,166 @@ error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:6:13 - | -6 | struct Bar1(BadType); - | ^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:6:13 + | +6 | struct Bar1(BadType); + | ^^^^^^^ 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` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_value>(&mut self, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:10:5 - | -10 | field: BadType, - | ^^^^^^^^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:10:5 + | +10 | field: BadType, + | ^^^^^^^^^^^^^^ 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::<'_, rocket::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&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` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:16:5 - | -16 | bad: BadType, - | ^^^^^^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:16:5 + | +16 | bad: BadType, + | ^^^^^^^^^^^^ 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::<'_, rocket::http::uri::fmt::Query>::write_named_value` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&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` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:21:11 - | -21 | Inner(BadType), - | ^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:21:11 + | +21 | Inner(BadType), + | ^^^^^^^ 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: 1 redundant requirement hidden + = note: required for `&&BadType` to implement `UriDisplay` 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>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_value>(&mut self, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:27:9 - | -27 | field: BadType, - | ^^^^^^^^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:27:9 + | +27 | field: BadType, + | ^^^^^^^^^^^^^^ 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: 1 redundant requirement hidden + = 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` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&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` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:35:9 - | -35 | other: BadType, - | ^^^^^^^^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` - = note: 1 redundant requirement hidden - = note: required for `&&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:35:9 + | +35 | other: BadType, + | ^^^^^^^^^^^^^^ 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: 1 redundant requirement hidden + = 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` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_named_value>(&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` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_named_value>(&mut self, name: &str, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^^^^^ required by this bound in `Formatter::<'_, Query>::write_named_value` error[E0277]: the trait bound `BadType: UriDisplay` is not satisfied - --> tests/ui-fail-nightly/uri_display_type_errors.rs:40:12 - | -40 | struct Baz(BadType); - | ^^^^^^^ 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 48 others - = note: required for `&BadType` to implement `UriDisplay` + --> tests/ui-fail-nightly/uri_display_type_errors.rs:40:12 + | +40 | struct Baz(BadType); + | ^^^^^^^ 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` - --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs - | - | pub fn write_value>(&mut self, value: T) -> fmt::Result { - | ^^^^^^^^^^^^^ required by this bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` + --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs + | + | pub fn write_value>(&mut self, value: T) -> fmt::Result { + | ^^^^^^^^^^^^^ required by this bound in `Formatter::<'i, P>::write_value` diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index 69c48c0a..cdc3bf70 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -460,12 +460,6 @@ 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 - --> tests/ui-fail-stable/from_form.rs:153:24 - | -153 | #[field(validate = unknown())] - | ^^^^^^^ not found in this scope - error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:147:24 | @@ -475,6 +469,12 @@ error[E0308]: mismatched types = note: expected enum `Result<(), Errors<'_>>` found type `{integer}` +error[E0425]: cannot find function `unknown` in this scope + --> tests/ui-fail-stable/from_form.rs:153:24 + | +153 | #[field(validate = unknown())] + | ^^^^^^^ not found in this scope + error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:160:12 | @@ -511,7 +511,7 @@ error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:171:23 | 171 | #[field(default = 123)] - | ^^^ + | ^^^- help: try using a conversion method: `.to_string()` | | | expected struct `std::string::String`, found integer | arguments to this enum variant are incorrect @@ -521,19 +521,14 @@ note: tuple variant defined here | | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^^^ -help: try using a conversion method - | -171 | #[field(default = 123.to_string())] - | ++++++++++++ -171 | #[field(default = 123.to_string())] - | ++++++++++++ error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:203:33 | 203 | #[field(default_with = Some("hi"))] - | ---- ^^^^ expected struct `std::string::String`, found `&str` - | | + | ---- ^^^^- help: try using a conversion method: `.to_string()` + | | | + | | expected struct `std::string::String`, found `&str` | arguments to this enum variant are incorrect | note: tuple variant defined here @@ -541,12 +536,6 @@ note: tuple variant defined here | | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^^^ -help: try using a conversion method - | -203 | #[field(default_with = Some("hi".to_string()))] - | ++++++++++++ -203 | #[field(default_with = Some("hi".to_string()))] - | ++++++++++++ error[E0277]: the trait bound `bool: From<&str>` is not satisfied --> tests/ui-fail-stable/from_form.rs:209:23 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 8f6d4bd2..9ae9ff99 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 @@ -62,7 +62,7 @@ error: expected key/value `key = value` --> tests/ui-fail-stable/route-attribute-general-syntax.rs:33:12 | 33 | #[get("/", ...)] - | ^^^ + | ^ error: handler arguments must be named --- help: to name an ignored handler argument, use `_name` 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 f608e52c..3131c9b0 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 @@ -17,15 +17,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:47:17 @@ -34,15 +28,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:49:22 @@ -51,15 +39,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:51:30 @@ -85,15 +67,9 @@ error[E0277]: the trait bound `i32: FromUriParam>` is not implemented for `i32` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > = note: required for `std::option::Option` to implement `FromUriParam>` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied @@ -103,15 +79,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`: - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> - <&'a str as FromUriParam> > > - and $N others + > + > + > + > = note: required for `Result` to implement `FromUriParam>` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied @@ -121,15 +94,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:60:24 @@ -138,15 +105,9 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:62:23 @@ -236,15 +197,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefix` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:77:15 @@ -270,15 +225,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:78:15 @@ -304,15 +253,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix>` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:81:37 @@ -340,15 +283,9 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | = help: the following other types implement trait `FromUriParam`: - > - > - > - > - > - > - > - > - and $N others + > + > + > error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix>` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:82:37