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