-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if enclosing body owner exists in
get_fn_id_for_return_block
- Loading branch information
Showing
3 changed files
with
57 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//@ edition: 2021 | ||
|
||
async fn a() { | ||
//~^ ERROR `()` is not a future | ||
//~| ERROR mismatched types | ||
a() //~ ERROR `()` is not a future | ||
} | ||
|
||
fn main() {} |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
error[E0277]: `()` is not a future | ||
--> $DIR/recurse-ice-129215.rs:6:5 | ||
| | ||
LL | a() | ||
| ^^^ `()` is not a future | ||
| | ||
= help: the trait `Future` is not implemented for `()` | ||
|
||
error[E0277]: `()` is not a future | ||
--> $DIR/recurse-ice-129215.rs:3:1 | ||
| | ||
LL | async fn a() { | ||
| ^^^^^^^^^^^^ `()` is not a future | ||
| | ||
= help: the trait `Future` is not implemented for `()` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/recurse-ice-129215.rs:3:14 | ||
| | ||
LL | async fn a() { | ||
| ______________^ | ||
LL | | | ||
LL | | | ||
LL | | a() | ||
LL | | } | ||
| |_^ expected `()`, found `async` fn body | ||
| | ||
= note: expected unit type `()` | ||
found `async` fn body `{async fn body of a()}` | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0277, E0308. | ||
For more information about an error, try `rustc --explain E0277`. |