rust/src/test/ui/impl-trait/issue-42479.rs
2018-12-25 21:08:33 -07:00

18 lines
196 B
Rust

// compile-pass
use std::iter::once;
struct Foo {
x: i32,
}
impl Foo {
fn inside(&self) -> impl Iterator<Item = &i32> {
once(&self.x)
}
}
fn main() {
println!("hi");
}