fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
5.2 KiB111 linesraw
1error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2  --> $DIR/ref-mut-self-async.rs:12:46
3   |
4LL |     async fn ref_self(&mut self, 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-self-async.rs:13:9
11   |
12LL |     async fn ref_self(&mut self, f: &u32) -> &u32 {
13   |                       -             - let's call the lifetime of this reference `'1`
14   |                       |
15   |                       let's call the lifetime of this reference `'2`
16LL |         f
17   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
18
19error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
20  --> $DIR/ref-mut-self-async.rs:18:52
21   |
22LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
23   |                                                    ^^^^
24   |
25   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
26
27error: lifetime may not live long enough
28  --> $DIR/ref-mut-self-async.rs:19:9
29   |
30LL |     async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
31   |                             -             - let's call the lifetime of this reference `'1`
32   |                             |
33   |                             let's call the lifetime of this reference `'2`
34LL |         f
35   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
36
37error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
38  --> $DIR/ref-mut-self-async.rs:22:61
39   |
40LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
41   |                                                             ^^^^
42   |
43   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
44
45error: lifetime may not live long enough
46  --> $DIR/ref-mut-self-async.rs:23:9
47   |
48LL |     async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
49   |                                     -              - let's call the lifetime of this reference `'1`
50   |                                     |
51   |                                     let's call the lifetime of this reference `'2`
52LL |         f
53   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
54
55error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
56  --> $DIR/ref-mut-self-async.rs:26:61
57   |
58LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
59   |                                                             ^^^^
60   |
61   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
62
63error: lifetime may not live long enough
64  --> $DIR/ref-mut-self-async.rs:27:9
65   |
66LL |     async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
67   |                                     -              - let's call the lifetime of this reference `'1`
68   |                                     |
69   |                                     let's call the lifetime of this reference `'2`
70LL |         f
71   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
72
73error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
74  --> $DIR/ref-mut-self-async.rs:30:70
75   |
76LL |     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
77   |                                                                      ^^^^
78   |
79   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
80
81error: lifetime may not live long enough
82  --> $DIR/ref-mut-self-async.rs:31:9
83   |
84LL |     async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
85   |                                             -               - let's call the lifetime of this reference `'1`
86   |                                             |
87   |                                             let's call the lifetime of this reference `'2`
88LL |         f
89   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
90
91error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
92  --> $DIR/ref-mut-self-async.rs:34:70
93   |
94LL |     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
95   |                                                                      ^^^^
96   |
97   = note: hidden type `impl std::future::Future` captures lifetime '_#15r
98
99error: lifetime may not live long enough
100  --> $DIR/ref-mut-self-async.rs:35:9
101   |
102LL |     async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
103   |                                             -               - let's call the lifetime of this reference `'1`
104   |                                             |
105   |                                             let's call the lifetime of this reference `'2`
106LL |         f
107   |         ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
108
109error: aborting due to 12 previous errors
110
111For more information about this error, try `rustc --explain E0700`.