2022-05-22 01:02:55 -04:00
|
|
|
// revisions: base nll
|
|
|
|
|
// ignore-compare-mode-nll
|
|
|
|
|
//[nll] compile-flags: -Z borrowck=mir
|
|
|
|
|
|
2014-10-26 00:07:41 +02:00
|
|
|
trait T<'a> {
|
|
|
|
|
fn a(&'a self) -> &'a bool;
|
|
|
|
|
fn b(&self) {
|
2022-05-22 01:02:55 -04:00
|
|
|
self.a();
|
|
|
|
|
//[base]~^ ERROR cannot infer
|
|
|
|
|
//[nll]~^^ ERROR lifetime may not live long enough
|
2014-10-26 00:07:41 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|