rust/tests/ui/nll/issue-52533-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
313 B
Rust
Raw Normal View History

#![allow(warnings)]
struct Foo<'a, 'b, T: 'a + 'b> { x: &'a T, y: &'b T }
fn gimme(_: impl for<'a, 'b, 'c> FnOnce(&'a Foo<'a, 'b, u32>,
&'a Foo<'a, 'c, u32>) -> &'a Foo<'a, 'b, u32>) { }
fn main() {
gimme(|x, y| y)
2022-04-01 17:13:25 +00:00
//~^ ERROR lifetime may not live long enough
}