1 error[E0597]: borrowed value does not live long enough
2 --> $DIR/wf-misc-methods-issue-28609.rs:32:31
4 LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough
5 | ^^ temporary value does not live long enough
7 | - temporary value only lives until here
9 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 30:1...
10 --> $DIR/wf-misc-methods-issue-28609.rs:30:1
12 LL | / fn return_dangling_pointer_inherent(s: S2) -> &u32 {
14 LL | | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough
18 error[E0597]: `four` does not live long enough
19 --> $DIR/wf-misc-methods-issue-28609.rs:45:20
21 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
22 | ^^^^ borrowed value does not live long enough
25 | - borrowed value only lives until here
27 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 42:1...
28 --> $DIR/wf-misc-methods-issue-28609.rs:42:1
30 LL | / fn return_dangling_pointer_coerce(s: S2) -> &u32 {
33 LL | | s.bomb = Some(&four); //~ ERROR does not live long enough
38 error[E0597]: `four` does not live long enough
39 --> $DIR/wf-misc-methods-issue-28609.rs:52:20
41 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
42 | ^^^^ borrowed value does not live long enough
45 | - borrowed value only lives until here
47 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 49:1...
48 --> $DIR/wf-misc-methods-issue-28609.rs:49:1
50 LL | / fn return_dangling_pointer_unary_op(s: S2) -> &u32 {
53 LL | | s.bomb = Some(&four); //~ ERROR does not live long enough
58 error[E0597]: borrowed value does not live long enough
59 --> $DIR/wf-misc-methods-issue-28609.rs:63:15
61 LL | s << &mut 3 //~ ERROR does not live long enough
62 | ^ temporary value does not live long enough
64 | - temporary value only lives until here
66 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 61:1...
67 --> $DIR/wf-misc-methods-issue-28609.rs:61:1
69 LL | / fn return_dangling_pointer_binary_op(s: S2) -> &u32 {
71 LL | | s << &mut 3 //~ ERROR does not live long enough
75 error[E0597]: borrowed value does not live long enough
76 --> $DIR/wf-misc-methods-issue-28609.rs:68:16
78 LL | s.shl(&mut 3) //~ ERROR does not live long enough
79 | ^ temporary value does not live long enough
81 | - temporary value only lives until here
83 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 66:1...
84 --> $DIR/wf-misc-methods-issue-28609.rs:66:1
86 LL | / fn return_dangling_pointer_method(s: S2) -> &u32 {
88 LL | | s.shl(&mut 3) //~ ERROR does not live long enough
92 error[E0597]: borrowed value does not live long enough
93 --> $DIR/wf-misc-methods-issue-28609.rs:73:21
95 LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough
96 | ^ temporary value does not live long enough
98 | - temporary value only lives until here
100 note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 71:1...
101 --> $DIR/wf-misc-methods-issue-28609.rs:71:1
103 LL | / fn return_dangling_pointer_ufcs(s: S2) -> &u32 {
105 LL | | S2::shl(s, &mut 3) //~ ERROR does not live long enough
109 error: aborting due to 6 previous errors
111 For more information about this error, try `rustc --explain E0597`.