Files
rust/src/test/ui/nll/issue-52533-1.rs

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

17 lines
454 B
Rust
Raw Normal View History

2022-05-21 13:42:16 -04:00
// ignore-compare-mode-nll
// revisions: base nll
// [nll]compile-flags: -Zborrowck=mir
#![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-05-21 13:42:16 -04:00
//[base]~^ ERROR mismatched types [E0308]
//[nll]~^^ ERROR lifetime may not live long enough
}