about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-10-23 05:39:23 +0000
committerRalf Jung <post@ralfj.de>2023-10-23 08:40:43 +0200
commitdd683dd12e0a969554a2073febe14ad061f6d3b1 (patch)
treef274bace23d5b85a86171b3ba97112019def8779
parent624f68da16c2f105dd2d7b4e16bc476d0c53c2b9 (diff)
downloadrust-dd683dd12e0a969554a2073febe14ad061f6d3b1.tar.gz
rust-dd683dd12e0a969554a2073febe14ad061f6d3b1.zip
fmt
-rw-r--r--src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs12
-rw-r--r--src/tools/miri/src/concurrency/data_race.rs1
-rw-r--r--src/tools/miri/src/shims/windows/foreign_items.rs4
3 files changed, 9 insertions, 8 deletions
diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
index b63b0bdff12..4232cd396c9 100644
--- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
+++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
@@ -661,13 +661,11 @@ impl<'tcx> Tree {
             for (perms_range, perms) in self.rperms.iter_mut_all() {
                 let idx = self.tag_mapping.get(&tag).unwrap();
                 // Only visit initialized permissions
-                if let Some(p) = perms.get(idx) && p.initialized {
-                    TreeVisitor {
-                        nodes: &mut self.nodes,
-                        tag_mapping: &self.tag_mapping,
-                        perms,
-                    }
-                    .traverse_nonchildren(
+                if let Some(p) = perms.get(idx)
+                    && p.initialized
+                {
+                    TreeVisitor { nodes: &mut self.nodes, tag_mapping: &self.tag_mapping, perms }
+                        .traverse_nonchildren(
                         tag,
                         |args| node_app(perms_range.clone(), args),
                         |args| err_handler(perms_range.clone(), args),
diff --git a/src/tools/miri/src/concurrency/data_race.rs b/src/tools/miri/src/concurrency/data_race.rs
index bec2972c50d..e49d62177c5 100644
--- a/src/tools/miri/src/concurrency/data_race.rs
+++ b/src/tools/miri/src/concurrency/data_race.rs
@@ -563,6 +563,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
         let old = this.allow_data_races_mut(|this| this.read_immediate(place))?;
         let lt = this.wrapping_binary_op(mir::BinOp::Lt, &old, &rhs)?.to_scalar().to_bool()?;
 
+        #[rustfmt::skip] // rustfmt makes this unreadable
         let new_val = if min {
             if lt { &old } else { &rhs }
         } else {
diff --git a/src/tools/miri/src/shims/windows/foreign_items.rs b/src/tools/miri/src/shims/windows/foreign_items.rs
index 759a412c16a..4ad44adff04 100644
--- a/src/tools/miri/src/shims/windows/foreign_items.rs
+++ b/src/tools/miri/src/shims/windows/foreign_items.rs
@@ -351,7 +351,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                     this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
                 this.read_target_isize(hModule)?;
                 let name = this.read_c_str(this.read_pointer(lpProcName)?)?;
-                if let Ok(name) = str::from_utf8(name) && is_dyn_sym(name) {
+                if let Ok(name) = str::from_utf8(name)
+                    && is_dyn_sym(name)
+                {
                     let ptr = this.fn_ptr(FnVal::Other(DynSym::from_str(name)));
                     this.write_pointer(ptr, dest)?;
                 } else {