2020-06-16 12:01:26 +00:00
|
|
|
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`
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/async-entry.rs:13:14
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
|
13 | async fn foo() { }
|
2020-07-21 17:23:59 +00:00
|
|
|
| ^^^
|
2020-06-16 12:01:26 +00:00
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:51:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
51 | #[rocket::launch]
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this attribute generates a `main` function
|
|
|
|
note: this function cannot be `main`
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:52:8
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
52 | fn main() -> rocket::Rocket {
|
2020-07-21 17:23:59 +00:00
|
|
|
| ^^^^
|
2020-06-16 12:01:26 +00:00
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:58:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
58 | #[rocket::launch]
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: this function must return a value
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:59:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
59 | async fn rocket() {
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:66:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
66 | #[rocket::launch]
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: this function must return a value
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:67:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
67 | fn rocket() {
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:81:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
81 | #[rocket::launch]
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this attribute generates a `main` function
|
|
|
|
note: this function cannot be `main`
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:82:8
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
82 | fn main() -> &'static str {
|
2020-07-21 17:23:59 +00:00
|
|
|
| ^^^^
|
2020-06-16 12:01:26 +00:00
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:89:5
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
89 | #[rocket::launch]
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this attribute generates a `main` function
|
|
|
|
note: this function cannot be `main`
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:90:14
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
90 | async fn main() -> rocket::Rocket {
|
2020-07-21 17:23:59 +00:00
|
|
|
| ^^^^
|
2020-06-16 12:01:26 +00:00
|
|
|
= 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
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:75:17
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
74 | fn rocket() -> rocket::Rocket {
|
2020-06-16 12:01:26 +00:00
|
|
|
| ------ this is not `async`
|
2021-04-08 08:07:52 +00:00
|
|
|
75 | let _ = rocket::build().launch().await;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:37:9
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2021-04-08 08:07:52 +00:00
|
|
|
37 | rocket::build()
|
|
|
|
| ^^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `Rocket`
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:46:9
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
46 | "hi".to_string()
|
2020-09-07 01:34:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ expected struct `Rocket`, found struct `std::string::String`
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-07-21 17:23:59 +00:00
|
|
|
--> $DIR/async-entry.rs:26:21
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-21 17:23:59 +00:00
|
|
|
26 | async fn main() {
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^ expected `()` because of default return type
|
|
|
|
| _____________________|
|
|
|
|
| |
|
2021-04-08 08:07:52 +00:00
|
|
|
27 | | rocket::build()
|
2020-07-22 23:10:02 +00:00
|
|
|
28 | | }
|
2021-02-27 04:58:12 +00:00
|
|
|
| | ^- help: consider using a semicolon here: `;`
|
2020-06-16 12:01:26 +00:00
|
|
|
| |_____|
|
2020-09-07 01:34:24 +00:00
|
|
|
| expected `()`, found struct `Rocket`
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:35:26
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
35 | async fn rocket() -> String {
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
2020-09-07 01:34:24 +00:00
|
|
|
| expected struct `Rocket`, found struct `std::string::String`
|
2020-06-16 12:01:26 +00:00
|
|
|
| expected due to this
|
|
|
|
|
2020-09-07 01:34:24 +00:00
|
|
|
error[E0277]: `main` has invalid return type `Rocket`
|
2020-07-22 23:10:02 +00:00
|
|
|
--> $DIR/async-entry.rs:96:20
|
2020-07-21 17:23:59 +00:00
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
96 | async fn main() -> rocket::Rocket {
|
2020-09-07 01:34:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
|
2020-07-21 17:23:59 +00:00
|
|
|
|
|
|
|
|
= help: consider using `()`, or a `Result`
|