Commit 0c7d5e2 1 parent 854948a commit 0c7d5e2 Copy full SHA for 0c7d5e2
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
189
189
let place = this. deref_pointer ( place) ?;
190
190
let rhs = this. read_immediate ( rhs) ?;
191
191
192
- if !place. layout . ty . is_integral ( ) && !place. layout . ty . is_unsafe_ptr ( ) {
192
+ if !place. layout . ty . is_integral ( ) && !place. layout . ty . is_raw_ptr ( ) {
193
193
span_bug ! (
194
194
this. cur_span( ) ,
195
195
"atomic arithmetic operations only work on integer and raw pointer types" ,
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
52
52
// Some more operations are possible with atomics.
53
53
// The return value always has the provenance of the *left* operand.
54
54
Add | Sub | BitOr | BitAnd | BitXor => {
55
- assert ! ( left. layout. ty. is_unsafe_ptr ( ) ) ;
56
- assert ! ( right. layout. ty. is_unsafe_ptr ( ) ) ;
55
+ assert ! ( left. layout. ty. is_raw_ptr ( ) ) ;
56
+ assert ! ( right. layout. ty. is_raw_ptr ( ) ) ;
57
57
let ptr = left. to_scalar ( ) . to_pointer ( this) ?;
58
58
// We do the actual operation with usize-typed scalars.
59
59
let left = ImmTy :: from_uint ( ptr. addr ( ) . bytes ( ) , this. machine . layouts . usize ) ;
You can’t perform that action at this time.
0 commit comments