-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
a807032
commit f7d0a8e
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`. |