rust/tests/ui/self/self_lifetime.stderr
2024-08-31 15:35:42 +03:00

19 lines
607 B
Plaintext

warning: elided lifetime has a name
--> $DIR/self_lifetime.rs:7:38
|
LL | fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
| -- ^ this elided lifetime gets resolved as `'b`
| |
| lifetime `'b` declared here
|
= note: `#[warn(elided_named_lifetimes)]` on by default
warning: elided lifetime has a name
--> $DIR/self_lifetime.rs:13:46
|
LL | fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
warning: 2 warnings emitted