change one of the ref-to-uninhbaited tests to Box
This commit is contained in:
parent
30548bb57e
commit
092c2b9d92
@ -1,6 +1,7 @@
|
|||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
use std::mem::transmute;
|
use std::mem::{transmute, forget};
|
||||||
|
|
||||||
fn main() { unsafe {
|
fn main() { unsafe {
|
||||||
let _x: &! = transmute(&42); //~ERROR encountered a reference pointing to uninhabited type !
|
let x: Box<!> = transmute(&mut 42); //~ERROR encountered a box pointing to uninhabited type !
|
||||||
|
forget(x);
|
||||||
} }
|
} }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user