forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#129223 - wafarm:fix-129215, r=compiler-errors
Fix wrong argument for `get_fn_decl` Closes rust-lang#129215 (seems to be introduced in rust-lang#129168)
- Loading branch information
Showing
5 changed files
with
49 additions
and
3 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`. |
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