]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr
New upstream version 1.41.1+dfsg1
[rustc.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 `'2` but it is returning data with lifetime `'1`
14 | | |
15 | | let's call the lifetime of this reference `'1`
16 | let's call the lifetime of this reference `'2`
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 `'2` but it is returning data with lifetime `'1`
23 | | |
24 | | let's call the lifetime of this reference `'1`
25 | let's call the lifetime of this reference `'2`
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 | -- - ^^^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
40 | | |
41 | | let's call the lifetime of this reference `'1`
42 | lifetime `'a` defined here
43
44 error: aborting due to 5 previous errors
45
46 For more information about this error, try `rustc --explain E0700`.