2022-05-17 10:36:34 -05:00
|
|
|
#![feature(never_type)]
|
2022-05-18 01:32:08 -05:00
|
|
|
use std::mem::{transmute, forget};
|
2022-05-17 10:36:34 -05:00
|
|
|
|
|
|
|
fn main() { unsafe {
|
2022-05-18 01:32:08 -05:00
|
|
|
let x: Box<!> = transmute(&mut 42); //~ERROR encountered a box pointing to uninhabited type !
|
|
|
|
forget(x);
|
2022-05-17 10:36:34 -05:00
|
|
|
} }
|