rust/tests/ui/self/self_lifetime.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
607 B
Plaintext
Raw Normal View History

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