Skip to content

Commit 23ad36d

Browse files
committed
rustfmt
1 parent 3cec209 commit 23ad36d

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/concurrency/thread.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,23 +1070,26 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
10701070
thread.state = ThreadState::Terminated;
10711071

10721072
let current_span = this.machine.current_span();
1073-
let thread_local_allocations = this.machine.threads.thread_terminated(
1074-
this.machine.data_race.as_mut(),
1075-
current_span,
1076-
);
1073+
let thread_local_allocations =
1074+
this.machine.threads.thread_terminated(this.machine.data_race.as_mut(), current_span);
10771075
match this.get_active_thread_id() {
10781076
// For main thread, add thread-local statics to static roots and skip deallocating
10791077
// backing memory
1080-
ThreadId(0) => for ptr in thread_local_allocations {
1081-
if let Some(alloc) = ptr.provenance.get_alloc_id() {
1082-
trace!("Main thread thread-local static stored as static root: {:?}", alloc);
1083-
this.machine.static_roots.push(alloc);
1084-
}
1085-
}
1078+
ThreadId(0) =>
1079+
for ptr in thread_local_allocations {
1080+
if let Some(alloc) = ptr.provenance.get_alloc_id() {
1081+
trace!(
1082+
"Main thread thread-local static stored as static root: {:?}",
1083+
alloc
1084+
);
1085+
this.machine.static_roots.push(alloc);
1086+
}
1087+
},
10861088
// Deallocate backing memory of thread-local statics
1087-
ThreadId(_) => for ptr in thread_local_allocations {
1088-
this.deallocate_ptr(ptr.into(), None, MiriMemoryKind::Tls.into())?;
1089-
}
1089+
ThreadId(_) =>
1090+
for ptr in thread_local_allocations {
1091+
this.deallocate_ptr(ptr.into(), None, MiriMemoryKind::Tls.into())?;
1092+
},
10901093
}
10911094
Ok(())
10921095
}

0 commit comments

Comments
 (0)