Add test.

This commit is contained in:
Camille GILLOT 2024-07-05 22:54:42 +00:00
parent f6fa358a18
commit 6aebb2cfec

View File

@ -0,0 +1,8 @@
//@ build-pass
//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+GVN
fn main() {
let variant: Option<u32> = None;
let transmuted: u64 = unsafe { std::mem::transmute(variant) };
println!("{transmuted}");
}