]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
Update const_forget.rs
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
1 error: lifetime may not live long enough
2   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
3    |
4 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
5    |                          -         -               ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
6    |                          |         |
7    |                          |         let's call the lifetime of this reference `'1`
8    |                          let's call the lifetime of this reference `'2`
9
10 error: lifetime may not live long enough
11   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
12    |
13 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
14    |                          -          -                                     ^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
15    |                          |          |
16    |                          |          let's call the lifetime of this reference `'1`
17    |                          let's call the lifetime of this reference `'2`
18
19 error: lifetime may not live long enough
20   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
21    |
22 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
23    |                  --              -                             ^^^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
24    |                  |               |
25    |                  |               let's call the lifetime of this reference `'1`
26    |                  lifetime `'a` defined here
27
28 error: aborting due to 3 previous errors
29