]> git.proxmox.com Git - rustc.git/blob - src/test/ui/self/elision/ref-struct-async.nll.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / self / elision / ref-struct-async.nll.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2 --> $DIR/ref-struct-async.rs:12:52
3 |
4 LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
5 | ^^^^
6 |
7 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
8
9 error: lifetime may not live long enough
10 --> $DIR/ref-struct-async.rs:13:9
11 |
12 LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
13 | - - let's call the lifetime of this reference `'1`
14 | |
15 | let's call the lifetime of this reference `'2`
16 LL | f
17 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
18
19 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
20 --> $DIR/ref-struct-async.rs:16:61
21 |
22 LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
23 | ^^^^
24 |
25 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
26
27 error: lifetime may not live long enough
28 --> $DIR/ref-struct-async.rs:17:9
29 |
30 LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
31 | - - let's call the lifetime of this reference `'1`
32 | |
33 | let's call the lifetime of this reference `'2`
34 LL | f
35 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
36
37 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
38 --> $DIR/ref-struct-async.rs:20:61
39 |
40 LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
41 | ^^^^
42 |
43 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
44
45 error: lifetime may not live long enough
46 --> $DIR/ref-struct-async.rs:21:9
47 |
48 LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
49 | - - let's call the lifetime of this reference `'1`
50 | |
51 | let's call the lifetime of this reference `'2`
52 LL | f
53 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
54
55 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
56 --> $DIR/ref-struct-async.rs:24:70
57 |
58 LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
59 | ^^^^
60 |
61 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
62
63 error: lifetime may not live long enough
64 --> $DIR/ref-struct-async.rs:25:9
65 |
66 LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
67 | - - let's call the lifetime of this reference `'1`
68 | |
69 | let's call the lifetime of this reference `'2`
70 LL | f
71 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
72
73 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
74 --> $DIR/ref-struct-async.rs:28:66
75 |
76 LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
77 | ^^^^
78 |
79 = note: hidden type `impl std::future::Future` captures lifetime '_#15r
80
81 error: lifetime may not live long enough
82 --> $DIR/ref-struct-async.rs:29:9
83 |
84 LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
85 | - - let's call the lifetime of this reference `'1`
86 | |
87 | let's call the lifetime of this reference `'2`
88 LL | f
89 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
90
91 error: aborting due to 10 previous errors
92
93 For more information about this error, try `rustc --explain E0700`.