mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
19 lines
607 B
Plaintext
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
|
|
|