Skip to content

Commit 24c18d0

Browse files
committed
cargo fmt
1 parent fb31de4 commit 24c18d0

File tree

6 files changed

+12
-37
lines changed

6 files changed

+12
-37
lines changed

src/borrow_tracker/mod.rs

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use std::num::NonZeroU64;
77
use log::trace;
88
use smallvec::SmallVec;
99

10-
use stacked::diagnostics::{RetagCause};
1110
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
11+
use stacked::diagnostics::RetagCause;
1212

1313
use crate::*;
1414

@@ -251,15 +251,14 @@ impl Method {
251251
machine: &MiriMachine<'mir, 'tcx>,
252252
) -> Option<State> {
253253
match self {
254-
Method::StackedBorrows => {
254+
Method::StackedBorrows =>
255255
Some(State::Stack(RefCell::new(Stacks::new_allocation(
256256
id,
257257
alloc.size(),
258258
global.unwrap(),
259259
kind,
260260
machine,
261-
))))
262-
},
261+
)))),
263262
Method::Off => None,
264263
}
265264
}
@@ -290,13 +289,7 @@ impl State {
290289
{
291290
match self {
292291
State::Stack(sb) =>
293-
sb.borrow_mut().before_memory_read(
294-
alloc_id,
295-
prov_extra,
296-
range,
297-
state,
298-
machine,
299-
),
292+
sb.borrow_mut().before_memory_read(alloc_id, prov_extra, range, state, machine),
300293
}
301294
}
302295

@@ -310,13 +303,7 @@ impl State {
310303
) -> InterpResult<'tcx> {
311304
match self {
312305
State::Stack(sb) =>
313-
sb.get_mut().before_memory_write(
314-
alloc_id,
315-
prov_extra,
316-
range,
317-
state,
318-
machine,
319-
),
306+
sb.get_mut().before_memory_write(alloc_id, prov_extra, range, state, machine),
320307
}
321308
}
322309

@@ -330,13 +317,7 @@ impl State {
330317
) -> InterpResult<'tcx> {
331318
match self {
332319
State::Stack(sb) =>
333-
sb.get_mut().before_memory_deallocation(
334-
alloc_id,
335-
prov_extra,
336-
range,
337-
state,
338-
machine,
339-
),
320+
sb.get_mut().before_memory_deallocation(alloc_id, prov_extra, range, state, machine),
340321
}
341322
}
342323

src/borrow_tracker/stacked/diagnostics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use rustc_target::abi::Size;
77

88
use crate::borrow_tracker::{
99
stacked::{err_sb_ub, Permission},
10-
AccessKind, GlobalStateInner,
11-
ProtectorKind,
10+
AccessKind, GlobalStateInner, ProtectorKind,
1211
};
1312
use crate::*;
1413

src/borrow_tracker/stacked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_target::abi::Size;
1212

1313
use crate::borrow_tracker::{
1414
stacked::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder, TagHistory},
15-
AccessKind, GlobalState, GlobalStateInner, RetagCause, ProtectorKind, RetagFields,
15+
AccessKind, GlobalState, GlobalStateInner, ProtectorKind, RetagCause, RetagFields,
1616
};
1717
use rustc_middle::{
1818
mir::{Mutability, RetagKind},

src/eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ use std::thread;
88

99
use log::info;
1010

11+
use crate::borrow_tracker::RetagFields;
1112
use rustc_data_structures::fx::FxHashSet;
1213
use rustc_hir::def::Namespace;
1314
use rustc_hir::def_id::DefId;
14-
use crate::borrow_tracker::RetagFields;
1515
use rustc_middle::ty::{
1616
self,
1717
layout::{LayoutCx, LayoutOf},

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ pub use crate::shims::time::EvalContextExt as _;
8484
pub use crate::shims::tls::{EvalContextExt as _, TlsData};
8585
pub use crate::shims::EvalContextExt as _;
8686

87-
pub use crate::borrow_tracker::{
88-
stacked::{EvalContextExt as StackedBorEvalContextExt, Item, Permission, Stack, Stacks},
87+
pub use crate::borrow_tracker::stacked::{
88+
EvalContextExt as StackedBorEvalContextExt, Item, Permission, Stack, Stacks,
8989
};
9090
pub use crate::borrow_tracker::{BorTag, CallId, Method as BorrowTrackerMethod, RetagFields};
9191
pub use crate::clock::{Clock, Instant};

src/tag_gc.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
171171
let this = self.eval_context_mut();
172172
this.memory.alloc_map().iter(|it| {
173173
for (_id, (_kind, alloc)) in it {
174-
alloc
175-
.extra
176-
.borrow_tracker
177-
.as_ref()
178-
.unwrap()
179-
.remove_unreachable_tags(&tags);
174+
alloc.extra.borrow_tracker.as_ref().unwrap().remove_unreachable_tags(&tags);
180175
}
181176
});
182177
}

0 commit comments

Comments
 (0)