2022-05-22 01:02:55 -04:00
|
|
|
// revisions: base nll
|
|
|
|
|
// ignore-compare-mode-nll
|
|
|
|
|
//[nll] compile-flags: -Z borrowck=mir
|
|
|
|
|
|
2014-10-03 22:37:08 -07:00
|
|
|
// Test that regionck suggestions in a provided method of a trait
|
|
|
|
|
// don't ICE
|
|
|
|
|
|
|
|
|
|
trait Foo<'a> {
|
|
|
|
|
fn foo(&'a self);
|
|
|
|
|
fn bar(&self) {
|
|
|
|
|
self.foo();
|
2022-05-22 01:02:55 -04:00
|
|
|
//[base]~^ ERROR cannot infer
|
|
|
|
|
//[nll]~^^ ERROR lifetime may not live long enough
|
2014-10-03 22:37:08 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|