summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-42479.rs
blob: efc1f975d16ed5d7fc30375ec98fca4a0b625f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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");
}