fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error[E0515]: cannot return value referencing temporary value 2 --> $DIR/wf-misc-methods-issue-28609.rs:22:5 3 | 4LL | s.transmute_inherent(&mut 42) 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^--^ 6 | | | 7 | | temporary value created here 8 | returns a value referencing data owned by the current function 9 10error[E0515]: cannot return value referencing local variable `four` 11 --> $DIR/wf-misc-methods-issue-28609.rs:36:5 12 | 13LL | s.bomb = Some(&four); 14 | ----- `four` is borrowed here 15LL | &s 16 | ^^ returns a value referencing data owned by the current function 17 18error[E0515]: cannot return value referencing local variable `four` 19 --> $DIR/wf-misc-methods-issue-28609.rs:43:5 20 | 21LL | s.bomb = Some(&four); 22 | ----- `four` is borrowed here 23LL | &*s 24 | ^^^ returns a value referencing data owned by the current function 25 26error[E0515]: cannot return value referencing temporary value 27 --> $DIR/wf-misc-methods-issue-28609.rs:53:5 28 | 29LL | s << &mut 3 30 | ^^^^^^^^^^- 31 | | | 32 | | temporary value created here 33 | returns a value referencing data owned by the current function 34 35error[E0515]: cannot return value referencing temporary value 36 --> $DIR/wf-misc-methods-issue-28609.rs:58:5 37 | 38LL | s.shl(&mut 3) 39 | ^^^^^^^^^^^-^ 40 | | | 41 | | temporary value created here 42 | returns a value referencing data owned by the current function 43 44error[E0515]: cannot return value referencing temporary value 45 --> $DIR/wf-misc-methods-issue-28609.rs:63:5 46 | 47LL | S2::shl(s, &mut 3) 48 | ^^^^^^^^^^^^^^^^-^ 49 | | | 50 | | temporary value created here 51 | returns a value referencing data owned by the current function 52 53error: aborting due to 6 previous errors 54 55For more information about this error, try `rustc --explain E0515`.