]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / lifetime-mismatch-between-trait-and-impl.rs
1 trait Foo {
2     fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32;
3 }
4
5 impl Foo for () {
6     fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {
7     //~^ ERROR `impl` item signature doesn't match `trait` item signature
8         if x > y { x } else { y }
9     }
10 }
11
12 fn main() {}