1 error[E0597]: `x` does not live long enough
2 --> $DIR/issue-52534-1.rs:19:9
4 LL | fn bar(&self, x: &u32) -> &u32 {
5 | ----- ---- has type `&'0 u32`
10 | ^^ `x` would have to be valid for `'0`
12 | - but `x` dropped here while still borrowed
14 error[E0597]: `x` does not live long enough
15 --> $DIR/issue-52534-1.rs:25:5
17 LL | fn foo(x: &u32) -> &u32 {
18 | ---- ---- also has type `&'0 u32`
23 | ^^ `x` would have to be valid for `'0`
25 | - but `x` dropped here while still borrowed
27 error[E0597]: `x` does not live long enough
28 --> $DIR/issue-52534-1.rs:30:6
30 LL | fn baz(x: &u32) -> &&u32 {
31 | ---- ----- has type `&'0 &'0 u32`
36 | ^^ `x` would have to be valid for `'0`
38 | - but `x` dropped here while still borrowed
40 error[E0597]: borrowed value does not live long enough
41 --> $DIR/issue-52534-1.rs:30:6
44 | ^^ temporary value does not live long enough
46 | - temporary value only lives until here
48 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 28:1...
49 --> $DIR/issue-52534-1.rs:28:1
51 LL | / fn baz(x: &u32) -> &&u32 {
57 error: aborting due to 4 previous errors
59 For more information about this error, try `rustc --explain E0597`.