2018-07-26 12:29:58 +02:00
|
|
|
#![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 13:13:25 -04:00
|
|
|
//~^ ERROR lifetime may not live long enough
|
2018-07-26 12:29:58 +02:00
|
|
|
}
|