about summary refs log tree commit diff
path: root/tests/ui/self/elision/ignore-non-reference-lifetimes.stderr
blob: 7108fa1a2908b8c49d83eb6da636457de657797d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
warning: eliding a lifetime that's named elsewhere is confusing
  --> $DIR/ignore-non-reference-lifetimes.rs:6:30
   |
LL |     fn a<'a>(self: Self, a: &'a str) -> &str {
   |                              ^^         ---- the same lifetime is elided here
   |                              |
   |                              the lifetime is named here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: consistently use `'a`
   |
LL |     fn a<'a>(self: Self, a: &'a str) -> &'a str {
   |                                          ++

warning: eliding a lifetime that's named elsewhere is confusing
  --> $DIR/ignore-non-reference-lifetimes.rs:10:33
   |
LL |     fn b<'a>(self: Foo<'b>, a: &'a str) -> &str {
   |                                 ^^         ---- the same lifetime is elided here
   |                                 |
   |                                 the lifetime is named here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: consistently use `'a`
   |
LL |     fn b<'a>(self: Foo<'b>, a: &'a str) -> &'a str {
   |                                             ++

warning: 2 warnings emitted