diff --git a/core/codegen/tests/ui-fail-nightly/catch.stderr b/core/codegen/tests/ui-fail-nightly/catch.stderr index ba12771e..b8949803 100644 --- a/core/codegen/tests/ui-fail-nightly/catch.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch.stderr @@ -74,7 +74,7 @@ note: function defined here --> tests/ui-fail-nightly/catch.rs:30:4 | 30 | fn f3(_request: &Request, other: bool) { } - | ^^--------------------- + | ^^ ------------------ ----------- 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 004aa229..48aca92c 100644 --- a/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/catch_type_errors.stderr @@ -1,8 +1,10 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:5:1 + --> tests/ui-fail-nightly/catch_type_errors.rs:6:30 | 5 | #[catch(404)] - | ^^^^^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` + | ------------- 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>> @@ -14,13 +16,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'static>> as Responder<'r, 'static>> and 40 others - = note: this error originates in the attribute macro `catch` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:10:1 + --> tests/ui-fail-nightly/catch_type_errors.rs:11:30 | 10 | #[catch(404)] - | ^^^^^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `bool` + | ------------- 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>> @@ -32,7 +35,6 @@ error[E0277]: the trait bound `bool: Responder<'_, '_>` is not satisfied as Responder<'r, 'static>> as Responder<'r, 'static>> and 40 others - = note: this error originates in the attribute macro `catch` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> tests/ui-fail-nightly/catch_type_errors.rs:16:17 @@ -46,13 +48,15 @@ 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:15:1 + --> tests/ui-fail-nightly/catch_type_errors.rs:16:26 | 15 | #[catch(404)] - | ^^^^^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` + | ------------- 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>> @@ -64,13 +68,14 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'static>> as Responder<'r, 'static>> and 40 others - = note: this error originates in the attribute macro `catch` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied - --> tests/ui-fail-nightly/catch_type_errors.rs:20:1 + --> tests/ui-fail-nightly/catch_type_errors.rs:21:12 | 20 | #[catch(404)] - | ^^^^^^^^^^^^^ the trait `Responder<'_, '_>` is not implemented for `usize` + | ------------- 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>> @@ -82,4 +87,3 @@ error[E0277]: the trait bound `usize: Responder<'_, '_>` is not satisfied as Responder<'r, 'static>> as Responder<'r, 'static>> and 40 others - = note: this error originates in the attribute macro `catch` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/core/codegen/tests/ui-fail-nightly/from_form.stderr b/core/codegen/tests/ui-fail-nightly/from_form.stderr index 9634d2b4..261a8b1d 100644 --- a/core/codegen/tests/ui-fail-nightly/from_form.stderr +++ b/core/codegen/tests/ui-fail-nightly/from_form.stderr @@ -524,4 +524,4 @@ error[E0277]: the trait bound `bool: From<&str>` is not satisfied 209 | #[field(default = "no conversion")] | ^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `bool` | - = note: required because of the requirements on the impl of `Into` for `&str` + = note: required for `&str` to implement `Into` 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 e18ca7fa..5f33b32f 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 @@ -14,7 +14,7 @@ error[E0277]: the trait bound `Unknown: FromFormField<'_>` is not satisfied IpAddr Ipv4Addr and 38 others - = note: required because of the requirements on the impl of `FromForm<'r>` for `Unknown` + = note: required for `Unknown` to implement `FromForm<'r>` error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied --> tests/ui-fail-nightly/from_form_type_errors.rs:14:12 @@ -32,4 +32,4 @@ error[E0277]: the trait bound `Foo: FromFormField<'_>` is not satisfied IpAddr Ipv4Addr and 38 others - = note: required because of the requirements on the impl of `FromForm<'r>` for `Foo` + = note: required for `Foo` to implement `FromForm<'r>` diff --git a/core/codegen/tests/ui-fail-nightly/responder-types.stderr b/core/codegen/tests/ui-fail-nightly/responder-types.stderr index 2db1a8cd..45974a57 100644 --- a/core/codegen/tests/ui-fail-nightly/responder-types.stderr +++ b/core/codegen/tests/ui-fail-nightly/responder-types.stderr @@ -31,7 +31,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied as From<&Prefetch>> as From<&Referrer>> and 4 others - = note: required because of the requirements on the impl of `Into>` for `u8` + = 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 | @@ -71,7 +71,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not satisfied as From<&Prefetch>> as From<&Referrer>> and 4 others - = note: required because of the requirements on the impl of `Into>` for `u8` + = 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 | @@ -94,7 +94,7 @@ error[E0277]: the trait bound `Header<'_>: From` is not sat 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 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 | 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 26c185e7..38470c0e 100644 --- a/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr +++ b/core/codegen/tests/ui-fail-nightly/route-type-errors.stderr @@ -43,7 +43,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied IpAddr Ipv4Addr and 38 others - = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` + = note: required for `Q` to implement `FromForm<'_>` error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:15:12 @@ -61,7 +61,7 @@ error[E0277]: the trait bound `Q: FromFormField<'_>` is not satisfied IpAddr Ipv4Addr and 38 others - = note: required because of the requirements on the impl of `FromForm<'_>` for `Q` + = note: required for `Q` to implement `FromForm<'_>` error[E0277]: the trait bound `Q: FromData<'_>` is not satisfied --> tests/ui-fail-nightly/route-type-errors.rs:18:12 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 315a2c1d..3b6dd8d3 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,3 +1,15 @@ +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` + --> tests/ui-fail-nightly/typed-uri-bad-type.rs:22:37 + | +22 | fn optionals(id: Option, name: Result) { } + | ^^^^^^^^^^^^^^^^^^^^ expected `&str`, found enum `Infallible` + error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:45:22 | @@ -82,7 +94,7 @@ error[E0277]: the trait bound `i32: FromUriParam> > and 34 others - = note: required because of the requirements on the impl of `FromUriParam>` for `std::option::Option` + = note: required for `std::option::Option` to implement `FromUriParam>` error[E0277]: the trait bound `std::string::String: FromUriParam>` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:56:42 @@ -100,7 +112,7 @@ error[E0277]: the trait bound `std::string::String: FromUriParam> > and 4 others - = note: required because of the requirements on the impl of `FromUriParam>` for `Result` + = note: required for `Result` to implement `FromUriParam>` error[E0277]: the trait bound `isize: FromUriParam` is not satisfied --> tests/ui-fail-nightly/typed-uri-bad-type.rs:58:19 @@ -360,15 +372,3 @@ note: required by a bound in `RouteUriBuilder::with_suffix` | | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` - -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` - --> 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/uri_display_type_errors.stderr b/core/codegen/tests/ui-fail-nightly/uri_display_type_errors.stderr index 3da46ef2..d3731abd 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 @@ -14,7 +14,7 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = 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 | @@ -37,7 +37,7 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = 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 | @@ -60,7 +60,7 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = 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 | @@ -83,9 +83,9 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + = 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 | @@ -108,9 +108,9 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + = 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 | @@ -133,9 +133,9 @@ error[E0277]: the trait bound `BadType: UriDisplay> > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = note: required for `&BadType` to implement `UriDisplay` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `UriDisplay` for `&&BadType` + = 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 | @@ -158,7 +158,7 @@ error[E0277]: the trait bound `BadType: UriDisplay > > and 48 others - = note: required because of the requirements on the impl of `UriDisplay` for `&BadType` + = 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 | diff --git a/core/codegen/tests/ui-fail-stable/catch.stderr b/core/codegen/tests/ui-fail-stable/catch.stderr index 9653e494..3c96610a 100644 --- a/core/codegen/tests/ui-fail-stable/catch.stderr +++ b/core/codegen/tests/ui-fail-stable/catch.stderr @@ -54,14 +54,20 @@ error: unexpected attribute parameter: `message` 26 | #[catch(400, message = "foo")] | ^^^^^^^ -error[E0308]: mismatched types - --> tests/ui-fail-stable/catch.rs:30:17 +error[E0308]: arguments to this function are incorrect + --> tests/ui-fail-stable/catch.rs:30:4 | 30 | fn f3(_request: &Request, other: bool) { } - | ^ expected `&rocket::Request<'_>`, found struct `Status` - -error[E0308]: mismatched types - --> tests/ui-fail-stable/catch.rs:30:34 + | ^^ - ---- an argument of type `bool` is missing + | | + | argument of type `&rocket::Request<'_>` unexpected + | +note: function defined here + --> tests/ui-fail-stable/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-stable/catch_type_errors.stderr b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr index 14be527f..6e9228a9 100644 --- a/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr +++ b/core/codegen/tests/ui-fail-stable/catch_type_errors.stderr @@ -40,7 +40,15 @@ error[E0308]: mismatched types --> tests/ui-fail-stable/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-stable/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-stable/catch_type_errors.rs:16:26 diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index aa3c6954..f7d04fe9 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -480,33 +480,45 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> tests/ui-fail-stable/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-stable/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-stable/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-stable/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[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:171:23 | 171 | #[field(default = 123)] - | ^^^ expected struct `std::string::String`, found integer + | ^^^ + | | + | expected struct `std::string::String`, found integer + | arguments to this enum variant are incorrect | +note: tuple variant defined here help: try using a conversion method | 171 | #[field(default = 123.to_string())] @@ -518,8 +530,11 @@ 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` + | ---- ^^^^ expected struct `std::string::String`, found `&str` + | | + | arguments to this enum variant are incorrect | +note: tuple variant defined here help: try using a conversion method | 203 | #[field(default_with = Some("hi".to_string()))]