Commit 5ca144c
authored
Rollup merge of #148713 - InvalidPathException:master, r=lcnr
rustc_borrowck: fix async closure error note to report AsyncFn rather than Fn
Fixes rust-lang/rust#148391
Root cause:
`async` closures are treated like plain `Fn` closures because we never updated their kind after adding the async coroutine path.
Symptom:
The compiler note tells users `closure implements Fn…`, which is wrong for async closures and made the error message confusing. Notably `FnMut` does not suffer from this issue.
Fix:
Fixed the wording
Testing:
Updated a UI test stderr file to reflect the correct wording. It also clearly demonstrates what was wrong.0 file changed
0 commit comments