2021-10-03 16:29:34 -05:00
|
|
|
// Regression test for issue #73159
|
|
|
|
// Tests thar we don't suggest replacing 'a with 'static'
|
|
|
|
|
|
|
|
struct Foo<'a>(&'a [u8]);
|
|
|
|
|
|
|
|
impl<'a> Foo<'a> {
|
2021-09-23 10:21:01 -05:00
|
|
|
fn make_it(&self) -> impl Iterator<Item = u8> {
|
2022-02-11 01:18:06 -06:00
|
|
|
self.0.iter().copied()
|
2022-02-14 10:10:22 -06:00
|
|
|
//~^ ERROR: captures lifetime that does not appear in bounds
|
2021-10-03 16:29:34 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|