/
macros_type_mismatch.stderr
51 lines (48 loc) · 2.01 KB
/
macros_type_mismatch.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:3:1
|
3 | #[tokio::main]
| ^^^^^^^^^^^^^^ expected `()`, found enum `Result`
4 | async fn missing_semicolon_or_return_type() {
| - help: a return type might be missing here: `-> _`
|
= note: expected unit type `()`
found enum `Result<(), _>`
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:8:1
|
8 | #[tokio::main]
| ^^^^^^^^^^^^^^ expected `()`, found enum `Result`
9 | async fn missing_return_type() {
| - help: a return type might be missing here: `-> _`
|
= note: expected unit type `()`
found enum `Result<(), _>`
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:13:1
|
13 | #[tokio::main]
| ^^^^^^^^^^^^^^ expected enum `Result`, found `()`
14 | async fn extra_semicolon() -> Result<(), ()> {
| -------------- expected `Result<(), ()>` because of return type
|
= note: expected enum `Result<(), ()>`
found unit type `()`
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info)
help: try wrapping the expression in a variant of `Result`
|
13 | Ok(#[tokio::main])
| +++ +
13 | Err(#[tokio::main])
| ++++ +
error[E0308]: mismatched types
--> $DIR/macros_type_mismatch.rs:29:1
|
29 | #[tokio::main]
| ^^^^^^^^^^^^^^ expected `()`, found integer
30 | async fn issue_4635() {
| - help: try adding a return type: `-> i32`
|
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info)