File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1- //@ only-x86_64-unknown-linux-gnu
1+ //@ only-64bit
22
33#![ feature( const_transmute) ]
44
5- pub const ZST : & [ u8 ] = unsafe { std:: mem:: transmute ( 1usize ) } ; //~ ERROR cannot transmute between types of different sizes, or dependently-sized types
5+ pub const ZST : & [ u8 ] = unsafe { std:: mem:: transmute ( 1usize ) } ;
6+ //~^ ERROR transmuting from 8-byte type to 16-byte type
Original file line number Diff line number Diff line change 1- error[E0512 ]: cannot transmute between types of different sizes, or dependently-sized types
1+ error[E0080 ]: transmuting from 8-byte type to 16-byte type: `usize` -> `&[u8]`
22 --> $DIR/issue-79494.rs:5:33
33 |
44LL | pub const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
5- | ^^^^^^^^^^^^^^^^^^^
6- |
7- = note: source type: `usize` (64 bits)
8- = note: target type: `&[u8]` (128 bits)
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `ZST` failed here
96
107error: aborting due to 1 previous error
118
12- For more information about this error, try `rustc --explain E0512 `.
9+ For more information about this error, try `rustc --explain E0080 `.
You can’t perform that action at this time.
0 commit comments