Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b5b1356

Browse files
committedJun 10, 2024
Auto merge of rust-lang#126240 - matthiaskrgr:rollup-ks4o2n9, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#126063 (Remove some unused crate dependencies.) - rust-lang#126115 (Fix ICE due to `unwrap` in `probe_for_name_many`) - rust-lang#126159 (ScalarInt: size mismatches are a bug, do not delay the panic) - rust-lang#126184 (interpret: do not ICE on padded non-pow2 SIMD vectors) - rust-lang#126191 (Fix `NonZero` doctest inconsistencies) - rust-lang#126211 (migrate tests/run-make/llvm-outputs to use rmake.rs) - rust-lang#126212 (fix: build on haiku) - rust-lang#126215 (Add explanatory note to async block type mismatch error) - rust-lang#126223 (run-make: add `run_in_tmpdir` self-test) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d402830 + d762ef1 commit b5b1356

File tree

74 files changed

+448
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+448
-379
lines changed
 

‎compiler/rustc_const_eval/src/interpret/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
519519
// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`.
520520
// First, check x % y != 0 (or if that computation overflows).
521521
let rem = self.binary_op(BinOp::Rem, a, b)?;
522-
if rem.to_scalar().assert_bits(a.layout.size) != 0 {
522+
if rem.to_scalar().to_bits(a.layout.size)? != 0 {
523523
throw_ub_custom!(
524524
fluent::const_eval_exact_div_has_remainder,
525525
a = format!("{a}"),

‎compiler/rustc_const_eval/src/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
13441344
/// Test if this value might be null.
13451345
/// If the machine does not support ptr-to-int casts, this is conservative.
13461346
pub fn scalar_may_be_null(&self, scalar: Scalar<M::Provenance>) -> InterpResult<'tcx, bool> {
1347-
Ok(match scalar.try_to_int() {
1347+
Ok(match scalar.try_to_scalar_int() {
13481348
Ok(int) => int.is_null(),
13491349
Err(_) => {
13501350
// Can only happen during CTFE.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.