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]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [note] this function must be `async`
|
2020-06-16 12:01:26 +00:00
|
|
|
--> $DIR/async-entry.rs:7:5
|
|
|
|
|
|
|
|
|
7 | fn foo() { }
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error: attribute can only be applied to `async` functions
|
|
|
|
--> $DIR/async-entry.rs:18:5
|
|
|
|
|
|
|
|
|
18 | #[rocket::main]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [note] this function must be `async`
|
2020-06-16 12:01:26 +00:00
|
|
|
--> $DIR/async-entry.rs:19:5
|
|
|
|
|
|
|
|
|
19 | fn main() {
|
2020-07-20 22:02:10 +00:00
|
|
|
| ^^
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error: attribute cannot be applied to `main` function
|
2020-07-20 22:02:10 +00:00
|
|
|
--- note: this attribute generates a `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
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [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
|
|
|
|
|
|
|
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
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [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-07-20 22:02:10 +00:00
|
|
|
| ^^^^^
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
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
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [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-07-20 22:02:10 +00:00
|
|
|
| ^^
|
2020-06-16 12:01:26 +00:00
|
|
|
|
|
|
|
error: attribute cannot be applied to `main` function
|
2020-07-20 22:02:10 +00:00
|
|
|
--- note: this attribute generates a `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
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [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
|
|
|
|
|
|
|
error: attribute cannot be applied to `main` function
|
2020-07-20 22:02:10 +00:00
|
|
|
--- note: this attribute generates a `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
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-07-20 22:02:10 +00:00
|
|
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: [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
|
|
|
|
|
|
|
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`
|
2020-07-22 23:10:02 +00:00
|
|
|
75 | let _ = rocket::ignite().launch().await;
|
2020-06-16 12:01:26 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-07-22 23:10:02 +00:00
|
|
|
37 | rocket::ignite()
|
2020-11-21 20:42:57 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ 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-11-21 20:42:57 +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
|
|
|
|
| _____________________|
|
|
|
|
| |
|
2020-07-22 23:10:02 +00:00
|
|
|
27 | | rocket::ignite()
|
|
|
|
28 | | }
|
2020-06-16 12:01:26 +00:00
|
|
|
| | ^- help: try adding a semicolon: `;`
|
|
|
|
| |_____|
|
2020-11-21 20:42:57 +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-11-21 20:42:57 +00:00
|
|
|
| expected struct `Rocket`, found struct `std::string::String`
|
2020-06-16 12:01:26 +00:00
|
|
|
| expected due to this
|
|
|
|
|
2020-11-21 20:42:57 +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-11-21 20:42:57 +00:00
|
|
|
| ^^^^^^^^^^^^^^ `main` can only return types that implement `Termination`
|
2020-07-21 17:23:59 +00:00
|
|
|
|
|
|
|
|
= help: consider using `()`, or a `Result`
|