mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
16 lines
302 B
Rust
16 lines
302 B
Rust
|
//@ known-bug: rust-lang/rust#129099
|
||
|
|
||
|
#![feature(type_alias_impl_trait)]
|
||
|
|
||
|
fn dyn_hoops<T: Sized>() -> dyn for<'a> Iterator<Item = impl Captures<'a>> {
|
||
|
loop {}
|
||
|
}
|
||
|
|
||
|
pub fn main() {
|
||
|
type Opaque = impl Sized;
|
||
|
fn define() -> Opaque {
|
||
|
let x: Opaque = dyn_hoops::<()>(0);
|
||
|
x
|
||
|
}
|
||
|
}
|