1 error: any use of this value will cause an error
2 --> $DIR/transmute-size-mismatch-before-typeck.rs:15:29
4 LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
5 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
7 | transmuting `usize` to `&[u8]` is not possible, because these types do not have the same size
9 = note: `#[deny(const_err)]` on by default
11 error: could not evaluate constant pattern
12 --> $DIR/transmute-size-mismatch-before-typeck.rs:10:9
17 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
18 --> $DIR/transmute-size-mismatch-before-typeck.rs:15:29
20 LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
23 = note: source type: `usize` (word size)
24 = note: target type: `&[u8]` (2 * word size)
26 error: could not evaluate constant pattern
27 --> $DIR/transmute-size-mismatch-before-typeck.rs:10:9
32 error: aborting due to 4 previous errors
34 For more information about this error, try `rustc --explain E0512`.