2022-05-22 02:05:15 -04:00
|
|
|
// revisions: base nll
|
|
|
|
|
// ignore-compare-mode-nll
|
|
|
|
|
//[nll] compile-flags: -Z borrowck=mir
|
|
|
|
|
|
2022-04-28 13:48:54 +02:00
|
|
|
// We didn't have a single test mentioning
|
|
|
|
|
// `ReEmpty` and this test changes that.
|
|
|
|
|
fn foo<'a>(_a: &'a u32) where for<'b> &'b (): 'a {
|
2022-05-22 02:05:15 -04:00
|
|
|
//[base]~^ NOTE type must outlive the empty lifetime as required by this binding
|
2022-04-28 13:48:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
foo(&10);
|
2022-05-22 02:05:15 -04:00
|
|
|
//[base]~^ ERROR the type `&'b ()` does not fulfill the required lifetime
|
|
|
|
|
//[nll]~^^ ERROR higher-ranked lifetime error
|
|
|
|
|
//[nll]~| NOTE could not prove
|
2022-04-28 13:48:54 +02:00
|
|
|
}
|