rust/tests/crashes/79409.rs

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

17 lines
243 B
Rust
Raw Normal View History

//@ known-bug: #79409
#![feature(extern_types)]
#![feature(unsized_locals)]
extern {
type Device;
}
unsafe fn make_device() -> Box<Device> {
Box::from_raw(0 as *mut _)
}
fn main() {
let d: Device = unsafe { *make_device() };
}