Skip to content

Commit 7749251

Browse files
committed
Auto merge of rust-lang#103513 - Dylan-DPC:rollup-nn3ite2, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#98204 (Stabilize `Option::unzip()`) - rust-lang#102587 (rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`) - rust-lang#103122 (Remove misc_cast and validate types when casting) - rust-lang#103379 (Truncate thread names on Linux and Apple targets) - rust-lang#103482 (Clairify Vec::capacity docs) - rust-lang#103511 (Codegen tweaks) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents a081fc7 + 6274c0f commit 7749251

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shims/intrinsics/simd.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
437437
let val = match (op.layout.ty.kind(), dest.layout.ty.kind()) {
438438
// Int-to-(int|float): always safe
439439
(ty::Int(_) | ty::Uint(_), ty::Int(_) | ty::Uint(_) | ty::Float(_)) =>
440-
this.misc_cast(&op, dest.layout.ty)?,
440+
this.int_to_int_or_float(&op, dest.layout.ty)?,
441441
// Float-to-float: always safe
442442
(ty::Float(_), ty::Float(_)) =>
443-
this.misc_cast(&op, dest.layout.ty)?,
443+
this.float_to_float_or_int(&op, dest.layout.ty)?,
444444
// Float-to-int in safe mode
445445
(ty::Float(_), ty::Int(_) | ty::Uint(_)) if safe_cast =>
446-
this.misc_cast(&op, dest.layout.ty)?,
446+
this.float_to_float_or_int(&op, dest.layout.ty)?,
447447
// Float-to-int in unchecked mode
448448
(ty::Float(FloatTy::F32), ty::Int(_) | ty::Uint(_)) if !safe_cast =>
449449
this.float_to_int_unchecked(op.to_scalar().to_f32()?, dest.layout.ty)?.into(),

0 commit comments

Comments
 (0)