summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/issue-73159-rpit-static.rs
blob: 3002408b07d8b52eb49db5c59fdb0e718afa5805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Regression test for issue #73159
// Tests thar we don't suggest replacing 'a with 'static'

struct Foo<'a>(&'a [u8]);

impl<'a> Foo<'a> {
    fn make_it(&self) -> impl Iterator<Item = u8> {
        self.0.iter().copied()
        //~^ ERROR: captures lifetime that does not appear in bounds
    }
}

fn main() {}