diff --git a/core/codegen/tests/ui-fail-nightly/async-entry.stderr b/core/codegen/tests/ui-fail-nightly/async-entry.stderr index 3ae1393b..0c76b4b4 100644 --- a/core/codegen/tests/ui-fail-nightly/async-entry.stderr +++ b/core/codegen/tests/ui-fail-nightly/async-entry.stderr @@ -106,12 +106,12 @@ note: this function cannot be `main` = note: this error originates in the attribute macro `rocket::launch` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0728]: `await` is only allowed inside `async` functions and blocks - --> tests/ui-fail-nightly/async-entry.rs:73:41 + --> tests/ui-fail-nightly/async-entry.rs:73:42 | 72 | fn rocket() -> _ { | ------ this is not `async` 73 | let _ = rocket::build().launch().await; - | ^^^^^^ only allowed inside `async` functions and blocks + | ^^^^^ only allowed inside `async` functions and blocks error[E0308]: mismatched types --> tests/ui-fail-nightly/async-entry.rs:35:9 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 af0c2e50..900f2947 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 @@ -276,6 +276,8 @@ error[E0277]: the trait bound `rocket::http::uri::Asterisk: ValidRouteSuffix $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` @@ -307,5 +309,7 @@ error[E0277]: the trait bound `rocket::http::uri::Origin<'_>: ValidRouteSuffix $WORKSPACE/core/http/src/uri/fmt/formatter.rs | + | pub fn with_suffix(self, suffix: S) -> SuffixedRouteUri + | ----------- required by a bound in this associated function | where S: ValidRouteSuffix> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RouteUriBuilder::with_suffix` diff --git a/core/codegen/tests/ui-fail-stable/async-entry.stderr b/core/codegen/tests/ui-fail-stable/async-entry.stderr index 1725775c..d7467aca 100644 --- a/core/codegen/tests/ui-fail-stable/async-entry.stderr +++ b/core/codegen/tests/ui-fail-stable/async-entry.stderr @@ -110,8 +110,11 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks error[E0308]: mismatched types --> tests/ui-fail-stable/async-entry.rs:35:9 | +33 | async fn rocket() -> String { + | ------ expected `std::string::String` because of return type +34 | let _ = rocket::build().launch().await; 35 | rocket::build() - | ^^^^^^^^^^^^^^^ expected struct `String`, found struct `Rocket` + | ^^^^^^^^^^^^^^^ expected `String`, found `Rocket` | = note: expected struct `std::string::String` found struct `Rocket` @@ -119,8 +122,11 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> tests/ui-fail-stable/async-entry.rs:44:9 | +42 | async fn rocket() -> _ { + | - expected `Rocket` because of return type +43 | let _ = rocket::build().launch().await; 44 | "hi".to_string() - | ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `String` + | ^^^^^^^^^^^^^^^^ expected `Rocket`, found `String` | = note: expected struct `Rocket` found struct `std::string::String` @@ -136,11 +142,29 @@ error[E0308]: mismatched types 26 | | } | | ^- help: consider using a semicolon here: `;` | |_____| - | expected `()`, found struct `Rocket` + | expected `()`, found `Rocket` | = note: expected unit type `()` found struct `Rocket` +error[E0308]: mismatched types + --> tests/ui-fail-stable/async-entry.rs:35:9 + | +35 | rocket::build() + | ^^^^^^^^^^^^^^^ expected `String`, found `Rocket` + | + = note: expected struct `std::string::String` + found struct `Rocket` + +error[E0308]: mismatched types + --> tests/ui-fail-stable/async-entry.rs:44:9 + | +44 | "hi".to_string() + | ^^^^^^^^^^^^^^^^ expected `Rocket`, found `String` + | + = note: expected struct `Rocket` + found struct `std::string::String` + error[E0277]: `main` has invalid return type `Rocket` --> tests/ui-fail-stable/async-entry.rs:94:20 | diff --git a/core/codegen/tests/ui-fail-stable/catch.stderr b/core/codegen/tests/ui-fail-stable/catch.stderr index 71552ba5..ac419d31 100644 --- a/core/codegen/tests/ui-fail-stable/catch.stderr +++ b/core/codegen/tests/ui-fail-stable/catch.stderr @@ -60,7 +60,7 @@ error[E0308]: arguments to this function are incorrect 30 | fn f3(_request: &Request, other: bool) { } | ^^ - ---- an argument of type `bool` is missing | | - | argument of type `Status` unexpected + | unexpected argument of type `Status` | note: function defined here --> tests/ui-fail-stable/catch.rs:30:4 diff --git a/core/codegen/tests/ui-fail-stable/from_form.stderr b/core/codegen/tests/ui-fail-stable/from_form.stderr index a6acfa24..94daef79 100644 --- a/core/codegen/tests/ui-fail-stable/from_form.stderr +++ b/core/codegen/tests/ui-fail-stable/from_form.stderr @@ -464,7 +464,7 @@ error[E0308]: mismatched types --> tests/ui-fail-stable/from_form.rs:147:24 | 147 | #[field(validate = 123)] - | ^^^ expected enum `Result`, found integer + | ^^^ expected `Result<(), Errors<'_>>`, found integer | = note: expected enum `Result<(), Errors<'_>>` found type `{integer}` @@ -481,7 +481,7 @@ error[E0308]: mismatched types 159 | #[field(validate = ext(rocket::http::ContentType::HTML))] | --- arguments to this function are incorrect 160 | first: String, - | ^^^^^^ expected enum `TempFile`, found struct `String` + | ^^^^^^ expected `&TempFile<'_>`, found `&String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -495,9 +495,9 @@ error[E0308]: arguments to this function are incorrect --> tests/ui-fail-stable/from_form.rs:165:24 | 165 | #[field(validate = ext("hello"))] - | ^^^ ------- expected struct `ContentType`, found `&str` + | ^^^ ------- expected `ContentType`, found `&str` 166 | first: String, - | ------ expected enum `TempFile`, found struct `String` + | ------ expected `&TempFile<'_>`, found `&String` | = note: expected reference `&TempFile<'_>` found reference `&std::string::String` @@ -513,7 +513,7 @@ error[E0308]: mismatched types 171 | #[field(default = 123)] | ^^^- help: try using a conversion method: `.to_string()` | | - | expected struct `String`, found integer + | expected `String`, found integer | arguments to this enum variant are incorrect | help: the type constructed contains `{integer}` due to the type of the argument passed @@ -530,7 +530,7 @@ error[E0308]: mismatched types 203 | #[field(default_with = Some("hi"))] | ---- ^^^^- help: try using a conversion method: `.to_string()` | | | - | | expected struct `String`, found `&str` + | | expected `String`, found `&str` | arguments to this enum variant are incorrect | help: the type constructed contains `&'static str` due to the type of the argument passed diff --git a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr index 218e523a..cd8c5387 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uri-bad-type.stderr @@ -2,13 +2,13 @@ error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected struct `Empty`, found `&str` + | ^^^^^^ expected `Empty`, found `&str` error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uri-bad-type.rs:22:37 | 22 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected `&str`, found struct `Empty` + | ^^^^^^ expected `&str`, found `Empty` error[E0277]: the trait bound `usize: FromUriParam` is not satisfied --> tests/ui-fail-stable/typed-uri-bad-type.rs:45:22 diff --git a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr index 227923a0..22b2d363 100644 --- a/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr +++ b/core/codegen/tests/ui-fail-stable/typed-uris-bad-params.stderr @@ -276,10 +276,10 @@ error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected struct `Empty`, found `&str` + | ^^^^^^ expected `Empty`, found `&str` error[E0271]: type mismatch resolving `>::Error == &str` --> tests/ui-fail-stable/typed-uris-bad-params.rs:15:37 | 15 | fn optionals(id: Option, name: Result) { } - | ^^^^^^ expected `&str`, found struct `Empty` + | ^^^^^^ expected `&str`, found `Empty`