-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/macros_type_mismatch.rs:5:5 | ||
--> $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: `-> _` | ||
5 | Ok(()) | ||
| ^^^^^^ expected `()`, found enum `Result` | ||
| | ||
= 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:10:5 | ||
| | ||
9 | async fn missing_return_type() { | ||
| - help: a return type might be missing here: `-> _` | ||
10 | return Ok(()); | ||
| ^^^^^^^^^^^^^^ expected `()`, found enum `Result` | ||
| | ||
= note: expected unit type `()` | ||
found enum `Result<(), _>` | ||
--> $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:23:5 | ||
--> $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 | ||
... | ||
23 | Ok(()); | ||
| ^^^^^^^ expected enum `Result`, found `()` | ||
| | ||
= note: expected enum `Result<(), ()>` | ||
found unit type `()` | ||
help: try adding an expression at the end of the block | ||
| | ||
23 ~ Ok(());; | ||
24 + Ok(()) | ||
= 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:32:5 | ||
--> $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` | ||
31 | return 1; | ||
32 | ; | ||
| ^ expected `()`, found integer | ||
| | ||
= note: this error originates in the attribute macro `tokio::main` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters