blob: 4f9b2fcd2ad0528c87e2176ba532d09b356ee1da [file] [log] [blame] [edit]
warning: eliding a lifetime that's named elsewhere is confusing
--> $DIR/self_lifetime.rs:7:23
|
LL | fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
| ^^ --- the same lifetime is elided here
| |
| the lifetime is named here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: consistently use `'b`
|
LL | fn foo<'b>(self: &'b Foo<'a>) -> &'b () { self.0 }
| ++
warning: eliding a lifetime that's named elsewhere is confusing
--> $DIR/self_lifetime.rs:13:36
|
LL | fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
| ^^ --- the same lifetime is elided here
| |
| the lifetime is named here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: consistently use `'a`
|
LL | fn bar<'a>(self: &Alias, arg: &'a ()) -> &'a () { arg }
| ++
warning: 2 warnings emitted