2017-08-06 04:09:43 +05:30
|
|
|
struct Foo {
|
|
|
|
field: i32,
|
2017-06-29 12:40:04 -07:00
|
|
|
}
|
2017-08-06 04:09:43 +05:30
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn foo<'a>(&self, x: &Foo) -> &Foo {
|
2022-05-22 02:05:15 -04:00
|
|
|
if true { x } else { self }
|
2022-04-01 13:13:25 -04:00
|
|
|
//~^ ERROR lifetime may not live long enough
|
2017-08-06 04:09:43 +05:30
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|