about summary refs log tree commit diff
path: root/tests/ui/self/self_lifetime-async.stderr
blob: 78cc610fd0436592137a8453103708242e2d6557 (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/self_lifetime-async.rs:6:44
   |
LL |     async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
   |                             --             ^^^ 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 `'b`
   |
LL |     async fn foo<'b>(self: &'b Foo<'a>) -> &'b () { self.0 }
   |                                             ++

warning: eliding a lifetime that's named elsewhere is confusing
  --> $DIR/self_lifetime-async.rs:12:52
   |
LL |     async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
   |                                          --        ^^^ 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 |     async fn bar<'a>(self: &Alias, arg: &'a ()) -> &'a () { arg }
   |                                                     ++

warning: 2 warnings emitted