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