Skip to content

Commit 612a4c9

Browse files
author
The Miri Cronjob Bot
committed
fmt
1 parent da6d117 commit 612a4c9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/borrow_tracker/stacked_borrows/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ trait EvalContextPrivExt<'tcx, 'ecx>: crate::MiriInterpCxExt<'tcx> {
673673
// attempt to use it for a non-zero-sized access.
674674
// Dangling slices are a common case here; it's valid to get their length but with raw
675675
// pointer tagging for example all calls to get_unchecked on them are invalid.
676-
if let Ok((alloc_id, base_offset, orig_tag)) = this.ptr_try_get_alloc_id(place.ptr(), 0) {
676+
if let Ok((alloc_id, base_offset, orig_tag)) = this.ptr_try_get_alloc_id(place.ptr(), 0)
677+
{
677678
log_creation(this, Some((alloc_id, base_offset, orig_tag)))?;
678679
// Still give it the new provenance, it got retagged after all.
679680
return Ok(Some(Provenance::Concrete { alloc_id, tag: new_tag }));

src/shims/unix/env.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ impl<'tcx> UnixEnvVars<'tcx> {
8181
return Ok(None);
8282
};
8383
// The offset is used to strip the "{name}=" part of the string.
84-
let var_ptr = var_ptr
85-
.wrapping_offset(Size::from_bytes(u64::try_from(name.len()).unwrap().strict_add(1)), ecx);
84+
let var_ptr = var_ptr.wrapping_offset(
85+
Size::from_bytes(u64::try_from(name.len()).unwrap().strict_add(1)),
86+
ecx,
87+
);
8688
Ok(Some(var_ptr))
8789
}
8890

0 commit comments

Comments
 (0)