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