Improve diagnostics for impl Trait capturing lifetimes #78402
Labels
A-async-await
Area: Async & Await
A-borrow-checker
Area: The borrow checker
A-impl-trait
Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch.
A-lifetimes
Area: lifetime related
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.
I tried this code:
I expected to see this happen: compiles correctly.
Instead, this happened:
Meta
rustc 1.47.0. This appears to be #42940, fixing which might depend on
type-alias-impl-trait
(although so far that's only a workaround, not really a fix?). It would be nice to have more specific diagnostics here.The text was updated successfully, but these errors were encountered: