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
2
2
3
3
#![ feature( const_transmute) ]
4
4
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]`
2
2
--> $DIR/issue-79494.rs:5:33
3
3
|
4
4
LL | 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
9
6
10
7
error: aborting due to 1 previous error
11
8
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