E0195 on where Self: 'a bounds when they are unconditionally satisfied by Self #84021
Labels
A-lifetimes
Area: Lifetimes / regions
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=9d4125a483581bb47d66f002f1074fda
I expected this to succeed. And in fact, the first impl (the generic one) succeeds! (i.e. the compiler is able to successfully determine that
Self: 'ctx
givenA: 'ctx
andB: 'ctx
)However, an error is emitted on the impl for
()
:In order to make this one compile, we need to add
where (): 'ctx
to the impl, which is, well, a bit silly!Addendum: In fact, any mention of the lifetime inside
where
bounds causes compilation to succeed.The text was updated successfully, but these errors were encountered: