fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
4.8 KiB103 linesraw
1error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2  --> $DIR/ref-mut-struct-async.rs:13:56
3   |
4LL |     async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
5   |                                                        ^^^^
6   |
7   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
8
9error: lifetime may not live long enough
10  --> $DIR/ref-mut-struct-async.rs:13:61
11   |
12LL |       async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
13   |  _______________________________-_____________________________^
14   | |                               |
15   | |                               lifetime `'_` defined here
16   | |                               lifetime `'_` defined here
17LL | |         f
18LL | |     }
19   | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
20
21error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
22  --> $DIR/ref-mut-struct-async.rs:17:65
23   |
24LL |     async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
25   |                                                                 ^^^^
26   |
27   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
28
29error: lifetime may not live long enough
30  --> $DIR/ref-mut-struct-async.rs:17:70
31   |
32LL |       async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
33   |  _______________________________________-______________________________^
34   | |                                       |
35   | |                                       lifetime `'_` defined here
36   | |                                       lifetime `'_` defined here
37LL | |         f
38LL | |     }
39   | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
40
41error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
42  --> $DIR/ref-mut-struct-async.rs:21:65
43   |
44LL |     async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
45   |                                                                 ^^^^
46   |
47   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
48
49error: lifetime may not live long enough
50  --> $DIR/ref-mut-struct-async.rs:21:70
51   |
52LL |       async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
53   |  _______________________________________-______________________________^
54   | |                                       |
55   | |                                       lifetime `'_` defined here
56   | |                                       lifetime `'_` defined here
57LL | |         f
58LL | |     }
59   | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
60
61error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
62  --> $DIR/ref-mut-struct-async.rs:25:74
63   |
64LL |     async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
65   |                                                                          ^^^^
66   |
67   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
68
69error: lifetime may not live long enough
70  --> $DIR/ref-mut-struct-async.rs:25:79
71   |
72LL |       async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
73   |  _______________________________________________-_______________________________^
74   | |                                               |
75   | |                                               lifetime `'_` defined here
76   | |                                               lifetime `'_` defined here
77LL | |         f
78LL | |     }
79   | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
80
81error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
82  --> $DIR/ref-mut-struct-async.rs:29:74
83   |
84LL |     async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
85   |                                                                          ^^^^
86   |
87   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
88
89error: lifetime may not live long enough
90  --> $DIR/ref-mut-struct-async.rs:29:79
91   |
92LL |       async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
93   |  _______________________________________________-_______________________________^
94   | |                                               |
95   | |                                               lifetime `'_` defined here
96   | |                                               lifetime `'_` defined here
97LL | |         f
98LL | |     }
99   | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_`
100
101error: aborting due to 10 previous errors
102
103For more information about this error, try `rustc --explain E0700`.