1 error[E0597]: borrowed value does not live long enough
2 --> $DIR/const-int-conversion.rs:14:28
4 LL | let x: &'static i32 = &(5_i32.reverse_bits());
5 | ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
8 | - temporary value only lives until here
10 = note: borrowed value must be valid for the static lifetime...
12 error[E0597]: borrowed value does not live long enough
13 --> $DIR/const-int-conversion.rs:16:28
15 LL | let y: &'static i32 = &(i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]));
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
19 | - temporary value only lives until here
21 = note: borrowed value must be valid for the static lifetime...
23 error[E0597]: borrowed value does not live long enough
24 --> $DIR/const-int-conversion.rs:18:28
26 LL | let z: &'static i32 = &(i32::from_le_bytes([0x12, 0x34, 0x56, 0x78]));
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
30 | - temporary value only lives until here
32 = note: borrowed value must be valid for the static lifetime...
34 error[E0597]: borrowed value does not live long enough
35 --> $DIR/const-int-conversion.rs:20:28
37 LL | let a: &'static i32 = &(i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0])));
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
41 | - temporary value only lives until here
43 = note: borrowed value must be valid for the static lifetime...
45 error[E0597]: borrowed value does not live long enough
46 --> $DIR/const-int-conversion.rs:22:29
48 LL | let b: &'static [u8] = &(0x12_34_56_78_i32.to_be_bytes());
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
52 | - temporary value only lives until here
54 = note: borrowed value must be valid for the static lifetime...
56 error[E0597]: borrowed value does not live long enough
57 --> $DIR/const-int-conversion.rs:24:29
59 LL | let c: &'static [u8] = &(0x12_34_56_78_i32.to_le_bytes());
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
63 | - temporary value only lives until here
65 = note: borrowed value must be valid for the static lifetime...
67 error[E0597]: borrowed value does not live long enough
68 --> $DIR/const-int-conversion.rs:26:29
70 LL | let d: &'static [u8] = &(i32::min_value().to_be().to_ne_bytes());
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
72 LL | //~^ ERROR does not live long enough
74 | - temporary value only lives until here
76 = note: borrowed value must be valid for the static lifetime...
78 error: aborting due to 7 previous errors
80 For more information about this error, try `rustc --explain E0597`.