about summary refs log tree commit diff
path: root/tests/ui/extern/unsized-extern-derefmove.rs
blob: 39597a12fe11731e93f1607430ec24f719556b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(extern_types)]

// Regression test for #79409

extern "C" {
    type Device;
}

unsafe fn make_device() -> Box<Device> {
    Box::from_raw(0 as *mut _)
}

fn main() {
    let d: Device = unsafe { *make_device() };
//~^ ERROR the size for values of type `Device` cannot be known
}