rust/tests/crashes/130521.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
215 B
Rust
Raw Normal View History

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