Closed
Description
#![allow(unconditional_recursion)]
struct X<T>(T);
trait A {
fn foo(self);
}
impl<T> A for T {
fn foo(self) {
X(self).foo() // <-- error points here
}
}
fn main() {
1.foo();
}
reports error: overflow evaluating the requirement
i32 : core::marker::Sized [E0275]
. While this code certainly shouldn't work, I would not expect proving i32: Sized
to be the problematic part.
(This is similar to #23714, but I think that's about the example failing to compile rather than the nonsense error.)