Skip to content

Commit 5e9cf62

Browse files
committed
Auto merge of #1929 - RalfJung:rustup, r=RalfJung
rustup With rust-lang/rust#91323 landed, we can remove these intrinsics from Miri.
2 parents 9983e0f + 70dd979 commit 5e9cf62

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
58f9efd36de5669ab731ec7ebf565999ff17b159
1+
1c0287830e0fb3c4007afea2819ba03766da6e9c

src/shims/intrinsics.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -550,37 +550,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
550550
"atomic_umax_relaxed" =>
551551
this.atomic_op(args, dest, AtomicOp::Max, AtomicRwOp::Relaxed)?,
552552

553-
// Query type information
554-
"assert_zero_valid" | "assert_uninit_valid" => {
555-
let &[] = check_arg_count(args)?;
556-
let ty = instance.substs.type_at(0);
557-
let layout = this.layout_of(ty)?;
558-
// Abort here because the caller might not be panic safe.
559-
if layout.abi.is_uninhabited() {
560-
// Use this message even for the other intrinsics, as that's what codegen does
561-
throw_machine_stop!(TerminationInfo::Abort(format!(
562-
"aborted execution: attempted to instantiate uninhabited type `{}`",
563-
ty
564-
)))
565-
}
566-
if intrinsic_name == "assert_zero_valid"
567-
&& !layout.might_permit_raw_init(this, /*zero:*/ true)
568-
{
569-
throw_machine_stop!(TerminationInfo::Abort(format!(
570-
"aborted execution: attempted to zero-initialize type `{}`, which is invalid",
571-
ty
572-
)))
573-
}
574-
if intrinsic_name == "assert_uninit_valid"
575-
&& !layout.might_permit_raw_init(this, /*zero:*/ false)
576-
{
577-
throw_machine_stop!(TerminationInfo::Abort(format!(
578-
"aborted execution: attempted to leave type `{}` uninitialized, which is invalid",
579-
ty
580-
)))
581-
}
582-
}
583-
584553
// Other
585554
"exact_div" => {
586555
let &[ref num, ref denom] = check_arg_count(args)?;

0 commit comments

Comments
 (0)