@@ -535,7 +535,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
535
535
) -> InterpResult < ' tcx > {
536
536
let this = self . eval_context_mut ( ) ;
537
537
this. validate_overlapping_atomic ( dest) ?;
538
- this. allow_data_races_mut ( move |this| this. write_scalar ( val, & ( * dest) . into ( ) ) ) ?;
538
+ this. allow_data_races_mut ( move |this| this. write_scalar ( val, & dest. into ( ) ) ) ?;
539
539
this. validate_atomic_store ( dest, atomic) ?;
540
540
// FIXME: it's not possible to get the value before write_scalar. A read_scalar will cause
541
541
// side effects from a read the program did not perform. So we have to initialise
@@ -562,7 +562,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
562
562
// Atomics wrap around on overflow.
563
563
let val = this. binary_op ( op, & old, rhs) ?;
564
564
let val = if neg { this. unary_op ( mir:: UnOp :: Not , & val) ? } else { val } ;
565
- this. allow_data_races_mut ( |this| this. write_immediate ( * val, & ( * place) . into ( ) ) ) ?;
565
+ this. allow_data_races_mut ( |this| this. write_immediate ( * val, & place. into ( ) ) ) ?;
566
566
567
567
this. validate_atomic_rmw ( place, atomic) ?;
568
568
@@ -587,7 +587,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
587
587
588
588
this. validate_overlapping_atomic ( place) ?;
589
589
let old = this. allow_data_races_mut ( |this| this. read_scalar ( & place. into ( ) ) ) ?;
590
- this. allow_data_races_mut ( |this| this. write_scalar ( new, & ( * place) . into ( ) ) ) ?;
590
+ this. allow_data_races_mut ( |this| this. write_scalar ( new, & place. into ( ) ) ) ?;
591
591
592
592
this. validate_atomic_rmw ( place, atomic) ?;
593
593
@@ -616,7 +616,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
616
616
if lt { & rhs } else { & old }
617
617
} ;
618
618
619
- this. allow_data_races_mut ( |this| this. write_immediate ( * * new_val, & ( * place) . into ( ) ) ) ?;
619
+ this. allow_data_races_mut ( |this| this. write_immediate ( * * new_val, & place. into ( ) ) ) ?;
620
620
621
621
this. validate_atomic_rmw ( place, atomic) ?;
622
622
@@ -675,7 +675,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
675
675
// if successful, perform a full rw-atomic validation
676
676
// otherwise treat this as an atomic load with the fail ordering.
677
677
if cmpxchg_success {
678
- this. allow_data_races_mut ( |this| this. write_scalar ( new, & ( * place) . into ( ) ) ) ?;
678
+ this. allow_data_races_mut ( |this| this. write_scalar ( new, & place. into ( ) ) ) ?;
679
679
this. validate_atomic_rmw ( place, success) ?;
680
680
this. buffered_atomic_rmw ( new, place, success, old. to_scalar_or_uninit ( ) ) ?;
681
681
} else {
@@ -964,7 +964,7 @@ impl VClockAlloc {
964
964
let ( index, clocks) = global. current_thread_state ( ) ;
965
965
let mut alloc_ranges = self . alloc_ranges . borrow_mut ( ) ;
966
966
for ( offset, range) in alloc_ranges. iter_mut ( range. start , range. size ) {
967
- if let Err ( DataRace ) = range. read_race_detect ( & * clocks, index) {
967
+ if let Err ( DataRace ) = range. read_race_detect ( & clocks, index) {
968
968
// Report data-race.
969
969
return Self :: report_data_race (
970
970
global,
@@ -992,7 +992,7 @@ impl VClockAlloc {
992
992
if global. race_detecting ( ) {
993
993
let ( index, clocks) = global. current_thread_state ( ) ;
994
994
for ( offset, range) in self . alloc_ranges . get_mut ( ) . iter_mut ( range. start , range. size ) {
995
- if let Err ( DataRace ) = range. write_race_detect ( & * clocks, index, write_type) {
995
+ if let Err ( DataRace ) = range. write_race_detect ( & clocks, index, write_type) {
996
996
// Report data-race
997
997
return Self :: report_data_race (
998
998
global,
@@ -1072,7 +1072,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
1072
1072
for ( offset, range) in
1073
1073
alloc_meta. alloc_ranges . borrow_mut ( ) . iter_mut ( base_offset, size)
1074
1074
{
1075
- if let Err ( DataRace ) = op ( range, & mut * clocks, index, atomic) {
1075
+ if let Err ( DataRace ) = op ( range, & mut clocks, index, atomic) {
1076
1076
mem:: drop ( clocks) ;
1077
1077
return VClockAlloc :: report_data_race (
1078
1078
data_race,
0 commit comments