blob: 92c85020e9a85110f0b4cb77977511f83dbea5d5 [file] [log] [blame]
// Various tests related to testing how region inference works
// with respect to the object receivers.
trait Foo {
fn borrowed<'a>(&'a self) -> &'a ();
}
// Borrowed receiver but two distinct lifetimes, we get an error.
fn borrowed_receiver_different_lifetimes<'a,'b>(x: &'a Foo) -> &'b () {
x.borrowed() //~ ERROR cannot infer
}
fn main() {}