File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 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> {
189189 let place = this. deref_pointer ( place) ?;
190190 let rhs = this. read_immediate ( rhs) ?;
191191
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 ( ) {
193193 span_bug ! (
194194 this. cur_span( ) ,
195195 "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> {
5252 // Some more operations are possible with atomics.
5353 // The return value always has the provenance of the *left* operand.
5454 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 ( ) ) ;
5757 let ptr = left. to_scalar ( ) . to_pointer ( this) ?;
5858 // We do the actual operation with usize-typed scalars.
5959 let left = ImmTy :: from_uint ( ptr. addr ( ) . bytes ( ) , this. machine . layouts . usize ) ;
You can’t perform that action at this time.
0 commit comments