rust/tests/ui/self/elision/ignore-non-reference-lifeti...

17 lines
568 B
Plaintext

warning: elided lifetime has a name
--> $DIR/ignore-non-reference-lifetimes.rs:6:41
|
LL | fn a<'a>(self: Self, a: &'a str) -> &str {
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
|
= note: `#[warn(elided_named_lifetimes)]` on by default
warning: elided lifetime has a name
--> $DIR/ignore-non-reference-lifetimes.rs:10:44
|
LL | fn b<'a>(self: Foo<'b>, a: &'a str) -> &str {
| -- lifetime `'a` declared here ^ this elided lifetime gets resolved as `'a`
warning: 2 warnings emitted