From 70dd979a44c5a2c79400285821f7ac0a06eaee55 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 30 Nov 2021 11:44:19 -0500 Subject: [PATCH] rustup --- rust-version | 2 +- src/shims/intrinsics.rs | 31 ------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/rust-version b/rust-version index cc01c7ccb4..6de6fe7620 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -58f9efd36de5669ab731ec7ebf565999ff17b159 +1c0287830e0fb3c4007afea2819ba03766da6e9c diff --git a/src/shims/intrinsics.rs b/src/shims/intrinsics.rs index f80062668f..39ed5ada0a 100644 --- a/src/shims/intrinsics.rs +++ b/src/shims/intrinsics.rs @@ -550,37 +550,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx "atomic_umax_relaxed" => this.atomic_op(args, dest, AtomicOp::Max, AtomicRwOp::Relaxed)?, - // Query type information - "assert_zero_valid" | "assert_uninit_valid" => { - let &[] = check_arg_count(args)?; - let ty = instance.substs.type_at(0); - let layout = this.layout_of(ty)?; - // Abort here because the caller might not be panic safe. - if layout.abi.is_uninhabited() { - // Use this message even for the other intrinsics, as that's what codegen does - throw_machine_stop!(TerminationInfo::Abort(format!( - "aborted execution: attempted to instantiate uninhabited type `{}`", - ty - ))) - } - if intrinsic_name == "assert_zero_valid" - && !layout.might_permit_raw_init(this, /*zero:*/ true) - { - throw_machine_stop!(TerminationInfo::Abort(format!( - "aborted execution: attempted to zero-initialize type `{}`, which is invalid", - ty - ))) - } - if intrinsic_name == "assert_uninit_valid" - && !layout.might_permit_raw_init(this, /*zero:*/ false) - { - throw_machine_stop!(TerminationInfo::Abort(format!( - "aborted execution: attempted to leave type `{}` uninitialized, which is invalid", - ty - ))) - } - } - // Other "exact_div" => { let &[ref num, ref denom] = check_arg_count(args)?;