mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
12 lines
313 B
Rust
12 lines
313 B
Rust
#![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
|
|
}
|