2022-05-22 01:02:55 -04:00
|
|
|
// revisions: base nll
|
|
|
|
|
// ignore-compare-mode-nll
|
|
|
|
|
//[nll] compile-flags: -Z borrowck=mir
|
|
|
|
|
|
2015-07-17 13:46:33 -04:00
|
|
|
fn foo<T>() where for<'a> T: 'a {}
|
|
|
|
|
|
2019-03-14 19:29:02 -07:00
|
|
|
fn bar<'a>() {
|
2015-07-17 13:46:33 -04:00
|
|
|
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
|
2015-07-17 13:46:33 -04:00
|
|
|
}
|
2019-03-14 19:29:02 -07:00
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
bar();
|
|
|
|
|
}
|