-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #65235 - nikomatsakis:issue-65159-async-fn-return-ice…
…, r=cramertj don't assume we can *always* find a return type hint in async fn In particular, we sometimes cannot if there is an earlier error. Fixes #65159 r? @cramertj, who reviewed the original PR
- Loading branch information
Showing
3 changed files
with
31 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,10 @@ | ||
// Regression test for #65159. We used to ICE. | ||
// | ||
// edition:2018 | ||
|
||
async fn copy() -> Result<()> //~ ERROR wrong number of type arguments | ||
{ | ||
Ok(()) | ||
} | ||
|
||
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,9 @@ | ||
error[E0107]: wrong number of type arguments: expected 2, found 1 | ||
--> $DIR/issue-65159.rs:5:20 | ||
| | ||
LL | async fn copy() -> Result<()> | ||
| ^^^^^^^^^^ expected 2 type arguments | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0107`. |