Auto merge of #1929 - RalfJung:rustup, r=RalfJung

rustup

With https://github.com/rust-lang/rust/pull/91323 landed, we can remove these intrinsics from Miri.
This commit is contained in:
bors 2021-11-30 16:45:05 +00:00
commit 5e9cf62b89
2 changed files with 1 additions and 32 deletions

View file

@ -1 +1 @@
58f9efd36de5669ab731ec7ebf565999ff17b159
1c0287830e0fb3c4007afea2819ba03766da6e9c

View file

@ -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)?;