Closed
Description
Code
trait A<T> {}
trait B {
type Type;
}
impl<T> B for T
where
T: A<Self::Type>,
{
type Type = bool;
}
Current output
error[E0275]: overflow evaluating the requirement `<T as B>::Type == <T as B>::Type`
--> src/lib.rs:7:1
|
7 | / impl<T> B for T
8 | | where
9 | | T: A<Self::Type>,
| |_____________________^
|
note: required for `T` to implement `B`
--> src/lib.rs:7:9
|
7 | impl<T> B for T
| ^ ^
8 | where
9 | T: A<Self::Type>,
| ------------- unsatisfied trait bound introduced here
For more information about this error, try `rustc --explain E0275`.
Desired output
an explanation that `Self::Type` does not reference `bool` but tries to figure out whether T already implements B
Rationale and extra context
spawned from #116914
Other cases
No response
Anything else?
No response