fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.8 KiB107 linesraw
1error: lifetime may not live long enough
2  --> $DIR/ref-self.rs:21:9
3   |
4LL |     fn ref_self(&self, f: &u32) -> &u32 {
5   |                 -         - let's call the lifetime of this reference `'1`
6   |                 |
7   |                 let's call the lifetime of this reference `'2`
8LL |         f
9   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
10   |
11help: consider introducing a named lifetime parameter and update trait if needed
12   |
13LL |     fn ref_self<'a>(&'a self, f: &'a u32) -> &u32 {
14   |                ++++  ++           ++
15
16error: lifetime may not live long enough
17  --> $DIR/ref-self.rs:28:9
18   |
19LL |     fn ref_Self(self: &Self, f: &u32) -> &u32 {
20   |                       -         - let's call the lifetime of this reference `'1`
21   |                       |
22   |                       let's call the lifetime of this reference `'2`
23LL |         f
24   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
25   |
26help: consider introducing a named lifetime parameter and update trait if needed
27   |
28LL |     fn ref_Self<'a>(self: &'a Self, f: &'a u32) -> &u32 {
29   |                ++++        ++           ++
30
31error: lifetime may not live long enough
32  --> $DIR/ref-self.rs:33:9
33   |
34LL |     fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
35   |                               -          - let's call the lifetime of this reference `'1`
36   |                               |
37   |                               let's call the lifetime of this reference `'2`
38LL |         f
39   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
40   |
41help: consider introducing a named lifetime parameter and update trait if needed
42   |
43LL |     fn box_ref_Self<'a>(self: Box<&'a Self>, f: &'a u32) -> &u32 {
44   |                    ++++            ++            ++
45
46error: lifetime may not live long enough
47  --> $DIR/ref-self.rs:38:9
48   |
49LL |     fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
50   |                               -          - let's call the lifetime of this reference `'1`
51   |                               |
52   |                               let's call the lifetime of this reference `'2`
53LL |         f
54   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
55   |
56help: consider introducing a named lifetime parameter and update trait if needed
57   |
58LL |     fn pin_ref_Self<'a>(self: Pin<&'a Self>, f: &'a u32) -> &u32 {
59   |                    ++++            ++            ++
60
61error: lifetime may not live long enough
62  --> $DIR/ref-self.rs:43:9
63   |
64LL |     fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
65   |                                       -           - let's call the lifetime of this reference `'1`
66   |                                       |
67   |                                       let's call the lifetime of this reference `'2`
68LL |         f
69   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
70   |
71help: consider introducing a named lifetime parameter and update trait if needed
72   |
73LL |     fn box_box_ref_Self<'a>(self: Box<Box<&'a Self>>, f: &'a u32) -> &u32 {
74   |                        ++++                ++             ++
75
76error: lifetime may not live long enough
77  --> $DIR/ref-self.rs:48:9
78   |
79LL |     fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
80   |                                       -           - let's call the lifetime of this reference `'1`
81   |                                       |
82   |                                       let's call the lifetime of this reference `'2`
83LL |         f
84   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
85   |
86help: consider introducing a named lifetime parameter and update trait if needed
87   |
88LL |     fn box_pin_ref_Self<'a>(self: Box<Pin<&'a Self>>, f: &'a u32) -> &u32 {
89   |                        ++++                ++             ++
90
91error: lifetime may not live long enough
92  --> $DIR/ref-self.rs:53:9
93   |
94LL |     fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
95   |                                      -                - let's call the lifetime of this reference `'1`
96   |                                      |
97   |                                      let's call the lifetime of this reference `'2`
98LL |         f
99   |         ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
100   |
101help: consider introducing a named lifetime parameter and update trait if needed
102   |
103LL |     fn wrap_ref_Self_Self<'a>(self: Wrap<&'a Self, Self>, f: &'a u8) -> &u8 {
104   |                          ++++             ++                  ++
105
106error: aborting due to 7 previous errors
107