mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
19 lines
655 B
Plaintext
19 lines
655 B
Plaintext
|
warning: elided lifetime has a name
|
||
|
--> $DIR/self_lifetime-async.rs:6:44
|
||
|
|
|
||
|
LL | async 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-async.rs:12:52
|
||
|
|
|
||
|
LL | async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
|
||
|
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
|
||
|
|
||
|
warning: 2 warnings emitted
|
||
|
|