Skip to content

Commit 6ba56ac

Browse files
committed
fix clippy warnings
1 parent f5aa313 commit 6ba56ac

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/tools/miri/src/borrow_tracker/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ impl AllocState {
413413
alloc_id: AllocId,
414414
prov_extra: ProvenanceExtra,
415415
range: AllocRange,
416-
machine: &mut MiriMachine<'_, 'tcx>,
416+
machine: &MiriMachine<'_, 'tcx>,
417417
) -> InterpResult<'tcx> {
418418
match self {
419419
AllocState::StackedBorrows(sb) =>
@@ -434,7 +434,7 @@ impl AllocState {
434434
alloc_id: AllocId,
435435
prov_extra: ProvenanceExtra,
436436
range: AllocRange,
437-
machine: &mut MiriMachine<'_, 'tcx>,
437+
machine: &MiriMachine<'_, 'tcx>,
438438
) -> InterpResult<'tcx> {
439439
match self {
440440
AllocState::StackedBorrows(sb) =>

src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl<'tcx> Stack {
244244
fn item_invalidated(
245245
item: &Item,
246246
global: &GlobalStateInner,
247-
dcx: &mut DiagnosticCx<'_, '_, '_, 'tcx>,
247+
dcx: &DiagnosticCx<'_, '_, '_, 'tcx>,
248248
cause: ItemInvalidationCause,
249249
) -> InterpResult<'tcx> {
250250
if !global.tracked_pointer_tags.is_empty() {
@@ -575,7 +575,7 @@ impl Stacks {
575575
alloc_id: AllocId,
576576
tag: ProvenanceExtra,
577577
range: AllocRange,
578-
machine: &mut MiriMachine<'_, 'tcx>,
578+
machine: &MiriMachine<'_, 'tcx>,
579579
) -> InterpResult<'tcx> {
580580
trace!(
581581
"write access with tag {:?}: {:?}, size {}",
@@ -596,7 +596,7 @@ impl Stacks {
596596
alloc_id: AllocId,
597597
tag: ProvenanceExtra,
598598
range: AllocRange,
599-
machine: &mut MiriMachine<'_, 'tcx>,
599+
machine: &MiriMachine<'_, 'tcx>,
600600
) -> InterpResult<'tcx> {
601601
trace!("deallocation with tag {:?}: {:?}, size {}", tag, alloc_id, range.size.bytes());
602602
let dcx = DiagnosticCxBuilder::dealloc(machine, tag);

src/tools/miri/src/shims/unix/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ use crate::*;
1818
const PTHREAD_MUTEX_NORMAL_FLAG: i32 = 0x8000000;
1919

2020
fn is_mutex_kind_default<'mir, 'tcx: 'mir>(
21-
ecx: &mut MiriInterpCx<'mir, 'tcx>,
21+
ecx: &MiriInterpCx<'mir, 'tcx>,
2222
kind: i32,
2323
) -> InterpResult<'tcx, bool> {
2424
Ok(kind == ecx.eval_libc_i32("PTHREAD_MUTEX_DEFAULT"))
2525
}
2626

2727
fn is_mutex_kind_normal<'mir, 'tcx: 'mir>(
28-
ecx: &mut MiriInterpCx<'mir, 'tcx>,
28+
ecx: &MiriInterpCx<'mir, 'tcx>,
2929
kind: i32,
3030
) -> InterpResult<'tcx, bool> {
3131
let mutex_normal_kind = ecx.eval_libc_i32("PTHREAD_MUTEX_NORMAL");

0 commit comments

Comments
 (0)