rust/tests/ui/impl-trait/issues/issue-42479.rs
2024-02-16 20:02:50 +00:00

18 lines
195 B
Rust

//@ check-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");
}