Skip to content

Commit 0ef0c41

Browse files
committed
Auto merge of #110967 - matthiaskrgr:rollup-vfbl7gm, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #110877 (Provide better type hints when a type doesn't support a binary operator) - #110917 (only error combining +whole-archive and +bundle for rlibs) - #110921 (Use `NonNull::new_unchecked` and `NonNull::len` in `rustc_arena`.) - #110927 (Encoder/decoder cleanups) - #110944 (share BinOp::Offset between CTFE and Miri) - #110948 (run-make test: using single quotes to not trigger the shell) - #110957 (Fix an ICE in conflict error diagnostics) - #110960 (fix false negative for `unused_mut`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents cd0001d + c13bf78 commit 0ef0c41

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/operator.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,6 @@ impl<'mir, 'tcx> EvalContextExt<'tcx> for super::MiriInterpCx<'mir, 'tcx> {
5353
(Scalar::from_bool(res), false, self.tcx.types.bool)
5454
}
5555

56-
Offset => {
57-
assert!(left.layout.ty.is_unsafe_ptr());
58-
let ptr = left.to_scalar().to_pointer(self)?;
59-
let offset = right.to_scalar().to_target_isize(self)?;
60-
61-
let pointee_ty =
62-
left.layout.ty.builtin_deref(true).expect("Offset called on non-ptr type").ty;
63-
let ptr = self.ptr_offset_inbounds(ptr, pointee_ty, offset)?;
64-
(Scalar::from_maybe_pointer(ptr, self), false, left.layout.ty)
65-
}
66-
6756
// Some more operations are possible with atomics.
6857
// The return value always has the provenance of the *left* operand.
6958
Add | Sub | BitOr | BitAnd | BitXor => {

0 commit comments

Comments
 (0)