1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/wf-misc-methods-issue-28609.rs:32:31
4 LL | s.transmute_inherent(&mut 42) //~ ERROR does not live long enough
5 | ^^ creates a temporary which is freed while still in use
7 | - temporary value is freed at the end of this statement
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:19
21 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
22 | ^^^^^ borrowed value does not live long enough
25 | - `four` dropped here while still borrowed
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:19
41 LL | s.bomb = Some(&four); //~ ERROR does not live long enough
42 | ^^^^^ borrowed value does not live long enough
45 | - `four` dropped here while still borrowed
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[E0716]: temporary value dropped while borrowed
59 --> $DIR/wf-misc-methods-issue-28609.rs:63:15
61 LL | s << &mut 3 //~ ERROR does not live long enough
62 | ^ creates a temporary which is freed while still in use
64 | - temporary value is freed at the end of this statement
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[E0716]: temporary value dropped while borrowed
76 --> $DIR/wf-misc-methods-issue-28609.rs:68:16
78 LL | s.shl(&mut 3) //~ ERROR does not live long enough
79 | ^ creates a temporary which is freed while still in use
81 | - temporary value is freed at the end of this statement
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[E0716]: temporary value dropped while borrowed
93 --> $DIR/wf-misc-methods-issue-28609.rs:73:21
95 LL | S2::shl(s, &mut 3) //~ ERROR does not live long enough
96 | ^ creates a temporary which is freed while still in use
98 | - temporary value is freed at the end of this statement
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 Some errors occurred: E0597, E0716.
112 For more information about an error, try `rustc --explain E0597`.