Skip to content

Commit 5ca144c

Browse files
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.
2 parents 8c66a7e + e612bce commit 5ca144c

0 file changed

File tree

    0 commit comments

    Comments
     (0)