Sign in
fuchsia
/
third_party
/
rust
/
346aec9b02f3c74f3fce97fd6bda24709d220e49
/
.
/
src
/
test
/
ui
/
lifetimes
/
lifetime-mismatch-between-trait-and-impl.rs
blob: 2ce1a0f45465170d808a29005ed8d4f251c4069f [
file
] [
log
] [
blame
]
trait
Foo
{
fn
foo
<
'a>(x: &i32, y: &'
a i32
)
->
&
'
a i32
;
}
impl
Foo
for
()
{
fn
foo
<
'a>(x: &'
a i32
,
y
:
&
'a i32) -> &'
a i32
{
//~^ ERROR `impl` item signature doesn't match `trait` item signature
if
x
>
y
{
x
}
else
{
y
}
}
}
fn
main
()
{}