mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
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:
+1
-1
@@ -1 +1 @@
|
||||
58f9efd36de5669ab731ec7ebf565999ff17b159
|
||||
1c0287830e0fb3c4007afea2819ba03766da6e9c
|
||||
|
||||
@@ -550,37 +550,6 @@ fn call_intrinsic(
|
||||
"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)?;
|
||||
|
||||
Reference in New Issue
Block a user