mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
24 lines
324 B
Rust
24 lines
324 B
Rust
//@ known-bug: #123141
|
|
|
|
trait Trait {
|
|
fn next(self) -> Self::Item;
|
|
type Item;
|
|
}
|
|
|
|
struct Foo<T: ?Sized>(T);
|
|
|
|
impl<T: ?Sized, U> Trait for Foo<U> {
|
|
type Item = Foo<T>;
|
|
fn next(self) -> Self::Item {
|
|
loop {}
|
|
}
|
|
}
|
|
|
|
fn opaque() -> impl Trait {
|
|
Foo::<_>(10_u32)
|
|
}
|
|
|
|
fn main() {
|
|
opaque().next();
|
|
}
|