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 2911ff25..2be0fb4a 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 @@ -4,6 +4,7 @@ error[E0277]: the trait bound `Unknown: Pool` is not satisfied 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 | @@ -16,6 +17,7 @@ error[E0277]: the trait bound `Vec: Pool` is not satisfied 11 | struct B(Vec); | ^^^^^^^^ the trait `Pool` is not implemented for `Vec` | + = 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 | 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 2987650f..8c5c073b 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 @@ -4,6 +4,7 @@ error[E0277]: the trait bound `Unknown: Poolable` is not satisfied 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 | @@ -16,6 +17,7 @@ error[E0277]: the trait bound `Vec: Poolable` is not satisfied 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 | diff --git a/core/codegen/tests/ui-fail-nightly/catch.stderr b/core/codegen/tests/ui-fail-nightly/catch.stderr index 2989a7bb..6e33f932 100644 --- a/core/codegen/tests/ui-fail-nightly/catch.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch.stderr @@ -62,14 +62,20 @@ error: unexpected attribute parameter: `message` | = help: `#[catch]` expects a status code int or `default`: `#[catch(404)]` or `#[catch(default)]` -error[E0308]: mismatched types - --> tests/ui-fail-nightly/catch.rs:30:17 +error[E0308]: arguments to this function are incorrect + --> tests/ui-fail-nightly/catch.rs:30:4 | 30 | fn f3(_request: &Request, other: bool) { } - | ^^^^^^^^ expected `&rocket::Request<'_>`, found struct `Status` - -error[E0308]: mismatched types - --> tests/ui-fail-nightly/catch.rs:30:34 + | ^^ -------- ---- an argument of type `bool` is missing + | | + | argument of type `&rocket::Request<'_>` unexpected + | +note: function defined here + --> tests/ui-fail-nightly/catch.rs:30:4 | 30 | fn f3(_request: &Request, other: bool) { } - | ^^^^ expected `bool`, found `&rocket::Request<'_>` + | ^^--------------------- +help: did you mean + | +29 | f3(bool, {bool}) + | 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 90f585a2..e311c72f 100644 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr @@ -5,6 +5,17 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ------------- required by a bound introduced by this call 6 | fn f1(_request: &Request) -> usize { | ^^^^^ 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 39 others error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/catch_type_errors.rs:11:30 @@ -13,12 +24,31 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied | ------------- required by a bound introduced by this call 11 | fn f2(_request: &Request) -> bool { | ^^^^ 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>> + and 39 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 `&rocket::Request<'_>` + | | + | arguments to this function are incorrect + | +note: function defined here + --> tests/ui-fail-nightly/catch_type_errors.rs:16:4 + | +16 | fn f3(_request: bool) -> usize { + | ^^- error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/catch_type_errors.rs:16:26 @@ -27,6 +57,17 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ------------- required by a bound introduced by this call 16 | fn f3(_request: bool) -> usize { | ^^^^^ 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 39 others error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied --> tests/ui-fail-nightly/catch_type_errors.rs:21:12 @@ -35,3 +76,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied | ------------- required by a bound introduced by this call 21 | fn f4() -> usize { | ^^^^^ 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 39 others diff --git a/core/codegen/tests/ui-fail-nightly/from_form.stderr b/core/codegen/tests/ui-fail-nightly/from_form.stderr index a97bea5c..05145afc 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form.stderr @@ -448,26 +448,34 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> tests/ui-fail-nightly/from_form.rs:160:12 | +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` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` - -error[E0308]: mismatched types - --> tests/ui-fail-nightly/from_form.rs:166:12 +note: function defined here + --> $WORKSPACE/core/lib/src/form/validate.rs | + | pub fn ext<'v>(file: &TempFile<'_>, r#type: ContentType) -> Result<'v, ()> { + | ^^^ + +error[E0308]: arguments to this function are incorrect + --> tests/ui-fail-nightly/from_form.rs:165:24 + | +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 `std::string::String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` - -error[E0308]: mismatched types - --> tests/ui-fail-nightly/from_form.rs:165:28 +note: function defined here + --> $WORKSPACE/core/lib/src/form/validate.rs | -165 | #[field(validate = ext("hello"))] - | ^^^^^^^ expected struct `ContentType`, found `&str` + | pub fn ext<'v>(file: &TempFile<'_>, r#type: ContentType) -> Result<'v, ()> { + | ^^^ error[E0277]: the trait bound `i32: From<&str>` is not satisfied --> tests/ui-fail-nightly/from_form.rs:171:23 @@ -475,19 +483,25 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied 171 | #[field(default = "no conversion")] | ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `i32` | - = help: the following implementations were found: - > - > - > - > - and 88 others + = help: the following other types implement trait `From`: + > + > + > + > + > + > + > + > + and 84 others = note: required because of the requirements on the impl of `Into` for `&str` error[E0308]: mismatched types --> tests/ui-fail-nightly/from_form.rs:203:33 | 203 | #[field(default_with = Some("hi"))] - | ^^^^ expected struct `std::string::String`, found `&str` + | ---- ^^^^ expected struct `std::string::String`, found `&str` + | | + | arguments to this enum variant are incorrect | help: try using a conversion method | 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 37cdf3fa..29ad0a48 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 @@ -4,6 +4,16 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied 7 | field: Unknown, | ^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Unknown` | + = help: the following other types implement trait `FromFormField<'v>`: + &'v str + Capped<&'v str> + Capped> + Capped> + Capped + Cow<'v, str> + Date + IpAddr + and 38 others = note: required because of the requirements on the impl of `FromForm<'r>` for `Unknown` error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied @@ -12,4 +22,14 @@ error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied 14 | field: Foo, | ^^^^^^^^^^ the trait `FromFormField<'_>` is not implemented for `Foo` | + = help: the following other types implement trait `FromFormField<'v>`: + &'v str + Capped<&'v str> + Capped> + Capped> + Capped + Cow<'v, str> + Date + IpAddr + and 38 others = note: required because of the requirements on the impl of `FromForm<'r>` for `Foo` diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr index c37a38be..2815320e 100644 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder-types.stderr @@ -3,6 +3,17 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied | 5 | thing: u8, | ^^^^^^^^^ 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>> + and 43 others error[E0277]: the trait bound `Header<'_>: From` is not satisfied --> tests/ui-fail-nightly/responder-types.rs:11:5 @@ -10,12 +21,16 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied 11 | other: u8, | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: as From<&Cookie<'_>>> as From<&ExpectCt>> as From<&Frame>> as From<&Hsts>> - and 8 others + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and 4 others = note: required because of the requirements on the impl of `Into>` for `u8` note: required by a bound in `rocket::Response::<'r>::set_header` --> $WORKSPACE/core/lib/src/response/response.rs @@ -28,6 +43,17 @@ error[E0277]: the trait bound `u8: Responder<'_, '_>` is not satisfied | 16 | thing: u8, | ^^^^^^^^^ 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>> + and 43 others error[E0277]: the trait bound `Header<'_>: From` is not satisfied --> tests/ui-fail-nightly/responder-types.rs:17:5 @@ -35,12 +61,16 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied 17 | other: u8, | ^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: as From<&Cookie<'_>>> as From<&ExpectCt>> as From<&Frame>> as From<&Hsts>> - and 8 others + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and 4 others = note: required because of the requirements on the impl of `Into>` for `u8` note: required by a bound in `rocket::Response::<'r>::set_header` --> $WORKSPACE/core/lib/src/response/response.rs @@ -54,12 +84,16 @@ error[E0277]: the trait bound `Header<'_>: From` is not sat 24 | then: String, | ^^^^^^^^^^^^ the trait `From` is not implemented for `Header<'_>` | - = help: the following implementations were found: + = help: the following other types implement trait `From`: as From<&Cookie<'_>>> as From<&ExpectCt>> as From<&Frame>> as From<&Hsts>> - and 8 others + as From<&NoSniff>> + as From<&Permission>> + as From<&Prefetch>> + as From<&Referrer>> + and 4 others = note: required because of the requirements on the impl of `Into>` for `std::string::String` note: required by a bound in `rocket::Response::<'r>::set_header` --> $WORKSPACE/core/lib/src/response/response.rs @@ -73,6 +107,16 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied 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 43 others note: required by a bound in `route::handler::, Status, rocket::Data<'o>>>::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 3d370408..02133d24 100644 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr @@ -3,12 +3,29 @@ error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied | 6 | fn f0(foo: Q) {} | ^ 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 + and 30 others error[E0277]: the trait bound `Q: FromSegments<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:9:12 | 9 | fn f1(foo: Q) {} | ^ 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[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:12:12 @@ -16,6 +33,16 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied 12 | fn f2(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` | + = help: the following other types implement trait `FromFormField<'v>`: + &'v str + Capped<&'v str> + Capped> + Capped> + Capped + Cow<'v, str> + Date + IpAddr + and 38 others = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied @@ -24,6 +51,16 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied 15 | fn f3(foo: Q) {} | ^ the trait `FromFormField<'_>` is not implemented for `Q` | + = help: the following other types implement trait `FromFormField<'v>`: + &'v str + Capped<&'v str> + Capped> + Capped> + Capped + Cow<'v, str> + Date + IpAddr + and 38 others = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied @@ -31,33 +68,99 @@ error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied | 18 | fn f4(foo: Q) {} | ^ 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> + Capped> + Capped> + and 12 others error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:21:10 | 21 | fn f5(a: Q, foo: Q) {} | ^ the trait `FromRequest<'_>` is not implemented for `Q` + | + = 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> + and 8 others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:21:18 | 21 | fn f5(a: Q, foo: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` + | + = help: the following other types implement trait `FromParam<'a>`: + &'a str + IpAddr + Ipv4Addr + Ipv6Addr + NonZeroI128 + NonZeroI16 + NonZeroI32 + NonZeroI64 + and 30 others error[E0277]: the trait bound `Q: FromRequest<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:24:10 | 24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^ the trait `FromRequest<'_>` is not implemented for `Q` + | + = 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> + and 8 others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:24:18 | 24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` + | + = help: the following other types implement trait `FromParam<'a>`: + &'a str + IpAddr + Ipv4Addr + Ipv6Addr + NonZeroI128 + NonZeroI16 + NonZeroI32 + NonZeroI64 + and 30 others error[E0277]: the trait bound `Q: FromParam<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:24:39 | 24 | fn f6(a: Q, foo: Q, good: usize, bar: Q) {} | ^ the trait `FromParam<'_>` is not implemented for `Q` + | + = help: the following other types implement trait `FromParam<'a>`: + &'a str + IpAddr + Ipv4Addr + Ipv6Addr + NonZeroI128 + NonZeroI16 + NonZeroI32 + NonZeroI64 + and 30 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 8f4a2e1f..315a2c1d 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 @@ -4,12 +4,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:47:17 @@ -17,12 +21,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:49:22 @@ -30,18 +38,33 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:51:30 | 51 | uri!(not_uri_display(10, S)); | ^ 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 155 others error[E0277]: the trait bound `i32: FromUriParam>` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:25 @@ -49,12 +72,16 @@ error[E0277]: the trait bound `i32: FromUriParam>` is not implemented for `i32` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied @@ -63,12 +90,16 @@ error[E0277]: the trait bound `std::string::String: FromUriParam>` is not implemented for `std::string::String` | - = help: the following implementations were found: + = 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 8 others + and 4 others = note: required because of the requirements on the impl of `FromUriParam>` for `Result` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied @@ -77,12 +108,16 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:60:24 @@ -90,24 +125,50 @@ error[E0277]: the trait bound `isize: FromUriParam` is not implemented for `isize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + and 34 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:62:23 | 62 | uri!(other_q(100, S)); | ^ 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 155 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:64:25 | 64 | uri!(other_q(rest = S, id = 100)); | ^ 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 155 others error[E0277]: the trait bound `S: Ignorable` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:66:25 @@ -115,6 +176,9 @@ error[E0277]: the trait bound `S: Ignorable` is n 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 | @@ -127,6 +191,9 @@ error[E0277]: the trait bound `usize: Ignorable` 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 | @@ -138,6 +205,17 @@ error[E0277]: the trait bound `S: FromUriParam | 68 | uri!(other_q(rest = S, id = _)); | ^ 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 155 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:77:40 @@ -145,12 +223,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + 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 @@ -161,6 +243,9 @@ error[E0277]: the trait bound `rocket::http::uri::Reference<'_>: ValidRoutePrefi | | 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 | @@ -173,12 +258,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + 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 @@ -189,6 +278,9 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRoutePrefix` is | | 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 | @@ -201,12 +293,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + 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 @@ -217,6 +313,11 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: 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 | @@ -229,12 +330,16 @@ error[E0277]: the trait bound `usize: FromUriParam` is not implemented for `usize` | - = help: the following implementations were found: - > - > - > + = help: the following other types implement trait `FromUriParam`: > - and 38 others + > + > + > + > + > + > + > + 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 @@ -245,6 +350,11 @@ error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: 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 | @@ -256,3 +366,9 @@ error[E0271]: type mismatch resolving `>::E | 22 | fn optionals(id: Option, name: Result) { } | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&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 `&str`, found enum `Infallible` 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 9adb9936..9296bbf9 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 @@ -286,3 +286,9 @@ error[E0271]: type mismatch resolving `>::E | 15 | fn optionals(id: Option, name: Result) { } | ^^^^^^^^^^^^^^^^^^^^ expected enum `Infallible`, found `&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 `&str`, found enum `Infallible` 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 99cf3b73..3da46ef2 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 @@ -4,6 +4,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs @@ -17,6 +27,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs @@ -30,6 +50,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'_, rocket::http::uri::fmt::Query>::write_named_value` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs @@ -43,6 +73,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` = note: 1 redundant requirement hidden = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` @@ -58,6 +98,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` = note: 1 redundant requirement hidden = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` @@ -73,6 +123,16 @@ 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 48 others = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` = note: 1 redundant requirement hidden = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` @@ -88,6 +148,16 @@ error[E0277]: the trait bound `BadType: UriDisplay 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 because of the requirements on the impl of `UriDisplay` for `&BadType` note: required by a bound in `rocket::http::uri::fmt::Formatter::<'i, P>::write_value` --> $WORKSPACE/core/http/src/uri/fmt/formatter.rs diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index 08056457..796ef5d7 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -512,7 +512,7 @@ error[E0277]: the trait bound `i32: From<&str>` is not satisfied > > > - and 5 others + and 88 others = note: required because of the requirements on the impl of `Into` for `&str` error[E0308]: mismatched types 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 6b7c64cc..f56bbf69 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 @@ -8,6 +8,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:47:17 @@ -19,6 +21,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 others error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:49:22 @@ -30,6 +34,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:51:30 @@ -47,6 +53,8 @@ error[E0277]: the trait bound `i32: FromUriParam> > > + > + and 38 others = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied @@ -60,7 +68,7 @@ error[E0277]: the trait bound `std::string::String: FromUriParam> > > - and 2 others + and 8 others = note: required because of the requirements on the impl of `FromUriParam>` for `Result` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied @@ -73,6 +81,8 @@ error[E0277]: the trait bound `isize: FromUriParam> > > + > + and 38 others error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:60:24 @@ -84,6 +94,8 @@ error[E0277]: the trait bound `isize: FromUriParam> > > + > + and 38 others error[E0277]: the trait bound `S: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:62:23 @@ -137,6 +149,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 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 @@ -162,6 +176,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 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 @@ -187,6 +203,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 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 @@ -212,6 +230,8 @@ error[E0277]: the trait bound `usize: FromUriParam> > > + > + and 38 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