1 error: lifetime may not live long enough
2 --> $DIR/ref-mut-self.rs:12:9
4 LL | fn ref_self(&mut self, f: &u32) -> &u32 {
5 | - - let's call the lifetime of this reference `'1`
7 | let's call the lifetime of this reference `'2`
9 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
11 error: lifetime may not live long enough
12 --> $DIR/ref-mut-self.rs:18:9
14 LL | fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
15 | - - let's call the lifetime of this reference `'1`
17 | let's call the lifetime of this reference `'2`
19 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
21 error: lifetime may not live long enough
22 --> $DIR/ref-mut-self.rs:22:9
24 LL | fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
25 | - - let's call the lifetime of this reference `'1`
27 | let's call the lifetime of this reference `'2`
29 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
31 error: lifetime may not live long enough
32 --> $DIR/ref-mut-self.rs:26:9
34 LL | fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
35 | - - let's call the lifetime of this reference `'1`
37 | let's call the lifetime of this reference `'2`
39 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
41 error: lifetime may not live long enough
42 --> $DIR/ref-mut-self.rs:30:9
44 LL | fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
45 | - - let's call the lifetime of this reference `'1`
47 | let's call the lifetime of this reference `'2`
49 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
51 error: lifetime may not live long enough
52 --> $DIR/ref-mut-self.rs:34:9
54 LL | fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
55 | - - let's call the lifetime of this reference `'1`
57 | let's call the lifetime of this reference `'2`
59 | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
61 error: aborting due to 6 previous errors