Files
rust/src/test/ui/issues/issue-26217.rs

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

16 lines
325 B
Rust
Raw Normal View History

2022-05-22 01:02:55 -04:00
// revisions: base nll
// ignore-compare-mode-nll
//[nll] compile-flags: -Z borrowck=mir
fn foo<T>() where for<'a> T: 'a {}
fn bar<'a>() {
foo::<&'a i32>();
2022-05-22 01:02:55 -04:00
//[base]~^ ERROR the type `&'a i32` does not fulfill the required lifetime
//[nll]~^^ ERROR lifetime may not live long enough
}
fn main() {
bar();
}