]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-52533-1.rs
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / nll / issue-52533-1.rs
1 #![allow(warnings)]
2
3 struct Foo<'a, 'b, T: 'a + 'b> { x: &'a T, y: &'b T }
4
5 fn gimme(_: impl for<'a, 'b, 'c> FnOnce(&'a Foo<'a, 'b, u32>,
6                                         &'a Foo<'a, 'c, u32>) -> &'a Foo<'a, 'b, u32>) { }
7
8 fn main() {
9     gimme(|x, y| y)
10     //~^ ERROR lifetime may not live long enough
11 }