Rocket/core/codegen/tests/ui-fail-nightly/async-entry.stderr

157 lines
4.9 KiB
Plaintext

error: attribute can only be applied to `async` functions
--> $DIR/async-entry.rs:6:5
|
6 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function must be `async`
--> $DIR/async-entry.rs:7:5
|
7 | fn foo() { }
| ^^^^^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: attribute is typically applied to `main` function
--> $DIR/async-entry.rs:12:5
|
12 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function is not `main`
--> $DIR/async-entry.rs:13:14
|
13 | async fn foo() { }
| ^^^
= note: this warning originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to `async` functions
--> $DIR/async-entry.rs:18:5
|
18 | #[rocket::main]
| ^^^^^^^^^^^^^^^
|
note: this function must be `async`
--> $DIR/async-entry.rs:19:5
|
19 | fn main() {
| ^^^^^^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:51:5
|
51 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:52:8
|
52 | fn main() -> rocket::Rocket {
| ^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to functions that return a value
--> $DIR/async-entry.rs:58:5
|
58 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
note: this function must return a value
--> $DIR/async-entry.rs:59:5
|
59 | async fn rocket() {
| ^^^^^^^^^^^^^^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute can only be applied to functions that return a value
--> $DIR/async-entry.rs:66:5
|
66 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
note: this function must return a value
--> $DIR/async-entry.rs:67:5
|
67 | fn rocket() {
| ^^^^^^^^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:81:5
|
81 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:82:8
|
82 | fn main() -> &'static str {
| ^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: attribute cannot be applied to `main` function
--> $DIR/async-entry.rs:89:5
|
89 | #[rocket::launch]
| ^^^^^^^^^^^^^^^^^
|
= note: this attribute generates a `main` function
note: this function cannot be `main`
--> $DIR/async-entry.rs:90:14
|
90 | async fn main() -> rocket::Rocket {
| ^^^^
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> $DIR/async-entry.rs:75:17
|
74 | fn rocket() -> rocket::Rocket {
| ------ this is not `async`
75 | let _ = rocket::ignite().launch().await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
error[E0308]: mismatched types
--> $DIR/async-entry.rs:37:9
|
37 | rocket::ignite()
| ^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:46:9
|
46 | "hi".to_string()
| ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:26:21
|
26 | async fn main() {
| ^ expected `()` because of default return type
| _____________________|
| |
27 | | rocket::ignite()
28 | | }
| | ^- help: consider using a semicolon here: `;`
| |_____|
| expected `()`, found struct `Rocket`
error[E0308]: mismatched types
--> $DIR/async-entry.rs:35:26
|
35 | async fn rocket() -> String {
| ^^^^^^
| |
| expected struct `Rocket`, found struct `std::string::String`
| expected due to this
error[E0277]: `main` has invalid return type `Rocket`
--> $DIR/async-entry.rs:96:20
|
96 | async fn main() -> rocket::Rocket {
| ^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
|
= help: consider using `()`, or a `Result`