summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-52533-1.rs
blob: d15daeddcc4b98bb8e3e8554e21619c044317097 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![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)
    //~^ ERROR lifetime may not live long enough
}