Conflicting error messages for HRTB in impl Trait
#69112
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rust declares the lifetime
'a
is both undeclared and that it is a shadowing declarationMy more complicated example is trying to use the
&'c mut Ctx<'d>
reference in one of the closures passed toIterator::map()
so I need to somehow incorporate the lifetime'c
into the return type.Instead I get this confusing error:
You'll notice the
help
text of the first error says "undeclared lifetime" but thehelp
of the second says "first declared here" and then gives a bogus "already in scope" hint.The text was updated successfully, but these errors were encountered: