rustup
This commit is contained in:
parent
d419efdba8
commit
8b4d613cc8
@ -1 +1 @@
|
||||
f24ef2e296ec6fc6fd2e24d7e4bfec3f4cb0577a
|
||||
22ee39504a702f75485582d02060495a01254de1
|
||||
|
@ -470,7 +470,12 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_number_validity(ecx: &MiriEvalContext<'mir, 'tcx>) -> bool {
|
||||
fn enforce_number_init(ecx: &MiriEvalContext<'mir, 'tcx>) -> bool {
|
||||
ecx.machine.enforce_number_validity
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_number_no_provenance(ecx: &MiriEvalContext<'mir, 'tcx>) -> bool {
|
||||
ecx.machine.enforce_number_validity
|
||||
}
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
fn main() {
|
||||
let r = &mut 42;
|
||||
let _i: usize = unsafe { std::mem::transmute(r) }; //~ ERROR expected initialized plain (non-pointer) bytes
|
||||
let _i: usize = unsafe { std::mem::transmute(r) }; //~ ERROR expected plain (non-pointer) bytes
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ use std::mem;
|
||||
// <https://github.com/rust-lang/unsafe-code-guidelines/issues/286#issuecomment-1085144431>.
|
||||
|
||||
unsafe fn deref(left: *const u8, right: *const u8) {
|
||||
let left_int: usize = mem::transmute(left); //~ERROR expected initialized plain (non-pointer) bytes
|
||||
let left_int: usize = mem::transmute(left); //~ERROR expected plain (non-pointer) bytes
|
||||
let right_int: usize = mem::transmute(right);
|
||||
if left_int == right_int {
|
||||
// The compiler is allowed to replace `left_int` by `right_int` here...
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
fn main() {
|
||||
let _val = unsafe { std::mem::MaybeUninit::<f32>::uninit().assume_init() };
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized bytes
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
fn main() {
|
||||
let _val = unsafe { std::mem::MaybeUninit::<usize>::uninit().assume_init() };
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized bytes
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
|
||||
fn main() {
|
||||
let _val = unsafe { std::mem::MaybeUninit::<i32>::uninit().assume_init() };
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes
|
||||
//~^ ERROR type validation failed at .value: encountered uninitialized bytes, but expected initialized bytes
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user