mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
243 B
Rust
17 lines
243 B
Rust
//@ 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() };
|
|
}
|