error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:15:21 | LL | let ref mut x = 1234543; //~ ERROR | ^^^^^^^ temporary value does not live long enough LL | x LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:20:25 | LL | let (ref mut x, ) = (1234543, ); //~ ERROR | ^^^^^^^^^^^ temporary value does not live long enough LL | x LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:25:11 | LL | match 1234543 { | ^^^^^^^ temporary value does not live long enough ... LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:31:11 | LL | match (123443,) { | ^^^^^^^^^ temporary value does not live long enough ... LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... error[E0597]: borrowed value does not live long enough --> $DIR/promote-ref-mut-in-let-issue-46557.rs:37:10 | LL | &mut 1234543 //~ ERROR | ^^^^^^^ temporary value does not live long enough LL | } | - temporary value only lives until here | = note: borrowed value must be valid for the static lifetime... error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0597`.