]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
Update ui tests
[rust.git] / src / test / ui / self / arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:45
3    |
4 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
5    |                                             ^^^^
6    |
7    = note: hidden type `impl std::future::Future` captures lifetime '_#15r
8
9 error: lifetime may not live long enough
10   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
11    |
12 LL |     async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
13    |                          -                         ^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
14    |                          |
15    |                          lifetime `'_` defined here
16    |                          lifetime `'_` defined here
17
18 error: lifetime may not live long enough
19   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
20    |
21 LL |     async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
22    |                          -                                                ^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
23    |                          |
24    |                          lifetime `'_` defined here
25    |                          lifetime `'_` defined here
26
27 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
28   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58
29    |
30 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
31    |                                                          ^^^
32    |
33    = note: hidden type `impl std::future::Future` captures lifetime '_#15r
34
35 error: lifetime may not live long enough
36   --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
37    |
38 LL |     async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
39    |                  --              - lifetime `'_` defined here  ^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'a`
40    |                  |
41    |                  lifetime `'a` defined here
42
43 error: aborting due to 5 previous errors
44
45 For more information about this error, try `rustc --explain E0700`.