Where clause causes type checking to spuriously fail #62512
Labels
A-typesystem
Area: The type system
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I have the following code on Rust 1.36.0 Stable (playground):
I would expect this to compile, but Rust seems confused by the fact that, in the
<T as Bar>::baz
implementation, theF
type parameter is bothFoo<Self::Input>
andFoo<T>
(T
andSelf::Input
are the same type) and complains that it expectsF
to also implementFoo<T>
:However, following the advice of adding a
Foo<T>
bound, Rust is again confused by thinking thatFoo<Self::Input>
andFoo<T>
are two different traits:The text was updated successfully, but these errors were encountered: