Sign in
fuchsia
/
third_party
/
rust
/
a8aa5114bf13d9c6b2b870c5bf63eab8e70a0018
/
.
/
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
()
{
}