rust/tests/ui/nll/issue-73159-rpit-static.rs
2023-01-11 09:32:08 +00:00

14 lines
315 B
Rust

// 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() {}