diff options
| author | Bastian Kersting <bkersting@google.com> | 2025-01-24 15:29:42 +0000 |
|---|---|---|
| committer | Bastian Kersting <bkersting@google.com> | 2025-02-10 13:01:59 +0000 |
| commit | 0c7d5e2873ac4a167c8b1c0235267630267298bd (patch) | |
| tree | e3dc63486bf7e0c978bcdb7871e97daa179ccc15 | |
| parent | 854948a4ab86e59648f235e1ba58562f7aa6ade7 (diff) | |
| download | rust-0c7d5e2873ac4a167c8b1c0235267630267298bd.tar.gz rust-0c7d5e2873ac4a167c8b1c0235267630267298bd.zip | |
Convert more missed places
| -rw-r--r-- | src/tools/miri/src/intrinsics/atomic.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/src/operator.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/miri/src/intrinsics/atomic.rs b/src/tools/miri/src/intrinsics/atomic.rs index 8507b0f49de..6d2a575ed76 100644 --- a/src/tools/miri/src/intrinsics/atomic.rs +++ b/src/tools/miri/src/intrinsics/atomic.rs @@ -189,7 +189,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> { let place = this.deref_pointer(place)?; let rhs = this.read_immediate(rhs)?; - if !place.layout.ty.is_integral() && !place.layout.ty.is_unsafe_ptr() { + if !place.layout.ty.is_integral() && !place.layout.ty.is_raw_ptr() { span_bug!( this.cur_span(), "atomic arithmetic operations only work on integer and raw pointer types", diff --git a/src/tools/miri/src/operator.rs b/src/tools/miri/src/operator.rs index c588b6fc7f1..81f22b2d0b2 100644 --- a/src/tools/miri/src/operator.rs +++ b/src/tools/miri/src/operator.rs @@ -52,8 +52,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Some more operations are possible with atomics. // The return value always has the provenance of the *left* operand. Add | Sub | BitOr | BitAnd | BitXor => { - assert!(left.layout.ty.is_unsafe_ptr()); - assert!(right.layout.ty.is_unsafe_ptr()); + assert!(left.layout.ty.is_raw_ptr()); + assert!(right.layout.ty.is_raw_ptr()); let ptr = left.to_scalar().to_pointer(this)?; // We do the actual operation with usize-typed scalars. let left = ImmTy::from_uint(ptr.addr().bytes(), this.machine.layouts.usize); |
