summary refs log tree commit diff
path: root/tests/crashes/130521.rs
blob: 7c078ab5790943205f7a9be1be9582a59d9f13dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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 };