Async fn disagrees on its own return type ("one of the expected opaque types" vs "one of the found opaque types") #82921
Labels
A-async-await
Area: Async & Await
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following is a minimal repro.
Note that rearranging
fn fail
to the following hides the issue and compiles. But my expectation would be that this does the exact same thing either way, with or without hiding the async block behind a named function.Various other very surprising transformations also hide the issue. For example:
or:
or:
I believe this is a compiler bug because none of the above transformations should have effect on whether this code compiles.
The text was updated successfully, but these errors were encountered: