summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issue-42479.rs
blob: 2da15ac5b6e7e24239eff34999792c97135d26c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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");
}