Sign in
fuchsia
/
third_party
/
rust
/
3c2fd1a72d2e8cc80b354b4d2dd7931a7afe1b02
/
.
/
src
/
test
/
ui
/
lifetimes
/
lifetime-errors
/
ex1-return-one-existing-name-self-is-anon.rs
blob: 597d20dbacd43ca0aee4d3ee671e9ca9eb7f4f6e [
file
] [
log
] [
blame
]
struct
Foo
{
field
:
i32
,
}
impl
Foo
{
fn
foo
<
'a>(&self, x: &'
a
Foo
)
->
&
'
a
Foo
{
if
true
{
x
}
else
{
self
}
//~ ERROR lifetime mismatch
}
}
fn
main
()
{}