1 error[E0515]: cannot return value referencing temporary value
2 --> $DIR/promote-ref-mut-in-let-issue-46557.rs:6:5
4 LL | let ref mut x = 1234543;
5 | ------- temporary value created here
7 | ^ returns a value referencing data owned by the current function
9 error[E0515]: cannot return value referencing temporary value
10 --> $DIR/promote-ref-mut-in-let-issue-46557.rs:11:5
12 LL | let (ref mut x, ) = (1234543, );
13 | ----------- temporary value created here
15 | ^ returns a value referencing data owned by the current function
17 error[E0515]: cannot return value referencing temporary value
18 --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:5
21 | ^ ------- temporary value created here
26 | |_____^ returns a value referencing data owned by the current function
28 error[E0515]: cannot return value referencing temporary value
29 --> $DIR/promote-ref-mut-in-let-issue-46557.rs:21:5
31 LL | match (123443,) {
32 | ^ --------- temporary value created here
35 LL | | (ref mut x,) => x,
37 | |_____^ returns a value referencing data owned by the current function
39 error[E0515]: cannot return reference to temporary value
40 --> $DIR/promote-ref-mut-in-let-issue-46557.rs:27:5
45 | | temporary value created here
46 | returns a reference to data owned by the current function
48 error: aborting due to 5 previous errors
50 For more information about this error, try `rustc --explain E0515`.