rust/tests/crashes/123141.rs

24 lines
324 B
Rust
Raw Normal View History

//@ known-bug: #123141
2024-05-29 11:06:50 -05:00
trait Trait {
fn next(self) -> Self::Item;
type Item;
}
2024-05-29 11:06:50 -05:00
struct Foo<T: ?Sized>(T);
2024-05-29 11:06:50 -05:00
impl<T: ?Sized, U> Trait for Foo<U> {
type Item = Foo<T>;
fn next(self) -> Self::Item {
loop {}
}
}
2024-05-29 11:06:50 -05:00
fn opaque() -> impl Trait {
Foo::<_>(10_u32)
}
fn main() {
2024-05-29 11:06:50 -05:00
opaque().next();
}