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.6 KiB103 linesraw
1error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2  --> $DIR/ref-struct-async.rs:13:52
3   |
4LL |     async fn ref_Struct(self: &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-struct-async.rs:13:57
11   |
12LL |       async fn ref_Struct(self: &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-struct-async.rs:17:61
23   |
24LL |     async fn box_ref_Struct(self: Box<&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-struct-async.rs:17:66
31   |
32LL |       async fn box_ref_Struct(self: Box<&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-struct-async.rs:21:61
43   |
44LL |     async fn pin_ref_Struct(self: Pin<&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-struct-async.rs:21:66
51   |
52LL |       async fn pin_ref_Struct(self: Pin<&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-struct-async.rs:25:70
63   |
64LL |     async fn box_box_ref_Struct(self: Box<Box<&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-struct-async.rs:25:75
71   |
72LL |       async fn box_box_ref_Struct(self: Box<Box<&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-struct-async.rs:29:66
83   |
84LL |     async fn box_pin_Struct(self: Box<Pin<&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-struct-async.rs:29:71
91   |
92LL |       async fn box_pin_Struct(self: Box<Pin<&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`.