Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
lifetimes
/
lifetime-errors
/
ex3-both-anon-regions-self-is-anon.rs
blob: 9b67a774264d5beb49e1addc8c56427deb948b35 [
file
] [
log
] [
blame
]
struct
Foo
{
field
:
i32
,
}
impl
Foo
{
fn
foo
<
'
a
>(&
self
,
x
:
&
Foo
)
->
&
Foo
{
if
true
{
x
}
else
{
self
}
//~^ ERROR lifetime may not live long enough
}
}
fn
main
()
{}