summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern/extern_fat_drop.rs
blob: 1cd12c2cab3393e22a40eed06af10faf49cfbbe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
// aux-build:fat_drop.rs

extern crate fat_drop;

fn main() {
    unsafe {
        let data: &mut [u8] = &mut [0];
        let s: &mut fat_drop::S = std::mem::transmute::<&mut [u8], _>(data);
        std::ptr::drop_in_place(s);
        assert!(fat_drop::DROPPED);
    }
}