Sign in
fuchsia
/
third_party
/
rust
/
7de9402b77ded0d8ec9e1c554521b2121449ef2b
/
.
/
src
/
test
/
ui
/
lifetimes
/
lifetime-errors
/
42701_one_named_and_one_anonymous.rs
blob: b0c09c7514e27f6e0999ad765dcad812ba3643e7 [
file
] [
log
] [
blame
]
struct
Foo
{
field
:
i32
,
}
fn
foo2
<
'a>(a: &'
a
Foo
,
x
:
&
i32
)
->
&
'
a i32
{
if
true
{
let
p
:
&
i32
=
&
a
.
field
;
&*
p
}
else
{
&*
x
//~ ERROR explicit lifetime
}
}
fn
main
()
{
}