@@ -176,19 +176,19 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
176
176
let mut current_state = alloc. global . current_thread_state_mut ( ) ;
177
177
if atomic == AtomicReadOp :: Relaxed {
178
178
// Perform relaxed atomic load
179
- for range in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
179
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
180
180
range. load_relaxed ( & mut * current_state) ;
181
181
}
182
182
} else {
183
183
// Perform acquire(or seq-cst) atomic load
184
- for range in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
184
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
185
185
range. acquire ( & mut * current_state) ;
186
186
}
187
187
}
188
188
189
189
// Log changes to atomic memory
190
190
if log:: log_enabled!( log:: Level :: Trace ) {
191
- for range in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
191
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
192
192
log:: trace!(
193
193
" updated atomic memory({:?}, offset={}, size={}) to {:#?}" ,
194
194
place. ptr. assert_ptr( ) . alloc_id, offset. bytes( ) , size. bytes( ) ,
@@ -227,19 +227,19 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
227
227
228
228
if atomic == AtomicWriteOp :: Relaxed {
229
229
// Perform relaxed atomic store
230
- for range in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
230
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
231
231
range. store_relaxed ( & mut * current_state, current_thread) ;
232
232
}
233
233
} else {
234
234
// Perform release(or seq-cst) atomic store
235
- for range in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
235
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
236
236
range. release ( & mut * current_state, current_thread) ;
237
237
}
238
238
}
239
239
240
240
// Log changes to atomic memory
241
241
if log:: log_enabled!( log:: Level :: Trace ) {
242
- for range in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
242
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
243
243
log:: trace!(
244
244
" updated atomic memory({:?}, offset={}, size={}) to {:#?}" ,
245
245
place. ptr. assert_ptr( ) . alloc_id, offset. bytes( ) , size. bytes( ) ,
@@ -279,7 +279,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
279
279
280
280
let acquire = matches ! ( atomic, Acquire | AcqRel | SeqCst ) ;
281
281
let release = matches ! ( atomic, Release | AcqRel | SeqCst ) ;
282
- for range in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
282
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter_mut ( offset, size) {
283
283
//FIXME: this is probably still slightly wrong due to the quirks
284
284
// in the c++11 memory model
285
285
if acquire {
@@ -298,7 +298,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
298
298
299
299
// Log changes to atomic memory
300
300
if log:: log_enabled!( log:: Level :: Trace ) {
301
- for range in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
301
+ for ( _ , range) in alloc. alloc_ranges . get_mut ( ) . iter ( offset, size) {
302
302
log:: trace!(
303
303
" updated atomic memory({:?}, offset={}, size={}) to {:#?}" ,
304
304
place. ptr. assert_ptr( ) . alloc_id, offset. bytes( ) , size. bytes( ) ,
@@ -733,7 +733,7 @@ impl VClockAlloc {
733
733
// The alloc-ranges are not split, however changes are not going to be made
734
734
// to the ranges being tested, so this is ok
735
735
let mut alloc_ranges = self . alloc_ranges . borrow_mut ( ) ;
736
- for range in alloc_ranges. iter_mut ( pointer. offset , len) {
736
+ for ( _ , range) in alloc_ranges. iter_mut ( pointer. offset , len) {
737
737
if range. read_race_detect ( & * current_state, current_thread) {
738
738
// Report data-race
739
739
return Self :: report_data_race (
@@ -754,7 +754,7 @@ impl VClockAlloc {
754
754
if self . global . multi_threaded . get ( ) {
755
755
let current_thread = self . global . current_thread ( ) ;
756
756
let current_state = self . global . current_thread_state ( ) ;
757
- for range in self . alloc_ranges . get_mut ( ) . iter_mut ( pointer. offset , len) {
757
+ for ( _ , range) in self . alloc_ranges . get_mut ( ) . iter_mut ( pointer. offset , len) {
758
758
if range. write_race_detect ( & * current_state, current_thread) {
759
759
// Report data-race
760
760
return Self :: report_data_race (
@@ -775,7 +775,7 @@ impl VClockAlloc {
775
775
if self . global . multi_threaded . get ( ) {
776
776
let current_thread = self . global . current_thread ( ) ;
777
777
let current_state = self . global . current_thread_state ( ) ;
778
- for range in self . alloc_ranges . get_mut ( ) . iter_mut ( pointer. offset , len) {
778
+ for ( _ , range) in self . alloc_ranges . get_mut ( ) . iter_mut ( pointer. offset , len) {
779
779
if range. write_race_detect ( & * current_state, current_thread) {
780
780
// Report data-race
781
781
return Self :: report_data_race (
0 commit comments