]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-73159-rpit-static.rs
Rollup merge of #103644 - catlee:catlee/option-question-mark-docs, r=workingjubilee
[rust.git] / src / test / ui / nll / issue-73159-rpit-static.rs
1 // Regression test for issue #73159
2 // Tests thar we don't suggest replacing 'a with 'static'
3
4 struct Foo<'a>(&'a [u8]);
5
6 impl<'a> Foo<'a> {
7     fn make_it(&self) -> impl Iterator<Item = u8> {
8         self.0.iter().copied()
9         //~^ ERROR: captures lifetime that does not appear in bounds
10     }
11 }
12
13 fn main() {}