未验证 提交 83dde88f 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #98653 - TaKO8Ki:add-regression-test-for-79494, r=Mark-Simulacrum

Add regression test for #79494

closes #79494
// only-x86_64-unknown-linux-gnu
#![feature(const_transmute)]
const ZST: &[u8] = unsafe { std::mem::transmute(1usize) }; //~ ERROR cannot transmute between types of different sizes, or dependently-sized types
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/issue-79494.rs:5:29
|
LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: `usize` (64 bits)
= note: target type: `&[u8]` (128 bits)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0512`.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册