Rustup
This commit is contained in:
parent
d39f0c64b8
commit
dfd7a6d5aa
@ -1 +1 @@
|
||||
a50d72158e08e02cfc051b863017bdbd2c45b637
|
||||
d74b36ea2f814b720c39d7b60aecaefe512a056b
|
||||
|
@ -4,5 +4,5 @@ pub enum Foo {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _f = unsafe { std::mem::transmute::<i32, Foo>(42) }; //~ ERROR encountered 0x0000002a at .<enum-tag>, but expected a valid enum tag
|
||||
let _f = unsafe { std::mem::transmute::<i32, Foo>(42) }; //~ ERROR type validation failed at .<enum-tag>: encountered 0x0000002a, but expected a valid enum tag
|
||||
}
|
||||
|
@ -266,5 +266,5 @@ union MyUninit {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _a = unsafe { MyUninit { init: () }.uninit }; //~ ERROR encountered uninitialized bytes at .<enum-tag>, but expected a valid enum tag
|
||||
let _a = unsafe { MyUninit { init: () }.uninit }; //~ ERROR type validation failed at .<enum-tag>: encountered uninitialized bytes, but expected a valid enum tag
|
||||
}
|
||||
|
@ -11,6 +11,6 @@ fn main() {
|
||||
let mut x = Bool::True;
|
||||
evil(&mut x);
|
||||
let y = x; // reading this ought to be enough to trigger validation
|
||||
//~^ ERROR encountered 0x0000002c at .<enum-tag>, but expected a valid enum tag
|
||||
//~^ ERROR type validation failed at .<enum-tag>: encountered 0x0000002c, but expected a valid enum tag
|
||||
println!("{:?}", y); // make sure it is used (and not optimized away)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![feature(maybe_uninit_extra, maybe_uninit_ref)]
|
||||
#![feature(maybe_uninit_extra)]
|
||||
use std::mem::MaybeUninit;
|
||||
use std::cell::{Cell, RefCell, UnsafeCell};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user