rust/tests/crashes/130521.rs
2024-10-10 00:57:59 +02:00

14 lines
215 B
Rust

//@ known-bug: #130521
#![feature(dyn_compatible_for_dispatch)]
struct Vtable(dyn Cap);
trait Cap<'a> {}
union Transmute {
t: u64,
u: &'static Vtable,
}
const G: &Copy = unsafe { Transmute { t: 1 }.u };