Skip to content

Commit 9750d69

Browse files
committed
fmt
1 parent 530e2cc commit 9750d69

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

src/concurrency/data_race.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1030,8 +1030,9 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
10301030
// <https://github.com/rust-lang/miri/pull/2464#discussion_r939636130> for details.
10311031
// We avoid `get_ptr_alloc` since we do *not* want to run the access hooks -- the actual
10321032
// access will happen later.
1033-
let (alloc_id, _offset, _prov) =
1034-
this.ptr_try_get_alloc_id(place.ptr()).expect("there are no zero-sized atomic accesses");
1033+
let (alloc_id, _offset, _prov) = this
1034+
.ptr_try_get_alloc_id(place.ptr())
1035+
.expect("there are no zero-sized atomic accesses");
10351036
if this.get_alloc_mutability(alloc_id)? == Mutability::Not {
10361037
// FIXME: make this prettier, once these messages have separate title/span/help messages.
10371038
throw_ub_format!(

src/concurrency/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use std::sync::atomic::{AtomicBool, Ordering::Relaxed};
77
use std::task::Poll;
88
use std::time::{Duration, SystemTime};
99

10-
use log::trace;
1110
use either::Either;
11+
use log::trace;
1212

1313
use rustc_data_structures::fx::FxHashMap;
1414
use rustc_hir::def_id::DefId;

src/shims/os_str.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
159159

160160
let arg_type = Ty::new_array(this.tcx.tcx, this.tcx.types.u16, size);
161161
let arg_place = this.allocate(this.layout_of(arg_type).unwrap(), memkind)?;
162-
let (written, _) =
163-
self.write_os_str_to_wide_str(os_str, arg_place.ptr(), size, /*truncate*/ false).unwrap();
162+
let (written, _) = self
163+
.write_os_str_to_wide_str(os_str, arg_place.ptr(), size, /*truncate*/ false)
164+
.unwrap();
164165
assert!(written);
165166
Ok(arg_place.ptr())
166167
}

src/shims/unix/macos/foreign_items.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
112112
// Access to command-line arguments
113113
"_NSGetArgc" => {
114114
let [] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
115-
this.write_pointer(
116-
this.machine.argc.expect("machine must be initialized"),
117-
dest,
118-
)?;
115+
this.write_pointer(this.machine.argc.expect("machine must be initialized"), dest)?;
119116
}
120117
"_NSGetArgv" => {
121118
let [] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
122-
this.write_pointer(
123-
this.machine.argv.expect("machine must be initialized"),
124-
dest,
125-
)?;
119+
this.write_pointer(this.machine.argv.expect("machine must be initialized"), dest)?;
126120
}
127121
"_NSGetExecutablePath" => {
128122
let [buf, bufsize] =

0 commit comments

Comments
 (0)