rust/tests/ui/impl-trait/issues/issue-42479.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
194 B
Rust
Raw Normal View History

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