Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
The Miri Conjob Bot committed Feb 22, 2024
1 parent 76a596c commit 6f3bc7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/tools/miri/tests/pass-dep/shims/mmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ fn test_mremap() {

// Test all of our error conditions
// Not aligned
let ptr =
unsafe { libc::mremap(ptr::without_provenance_mut(1), page_size, page_size, libc::MREMAP_MAYMOVE) };
let ptr = unsafe {
libc::mremap(ptr::without_provenance_mut(1), page_size, page_size, libc::MREMAP_MAYMOVE)
};
assert_eq!(ptr, libc::MAP_FAILED);
assert_eq!(Error::last_os_error().raw_os_error().unwrap(), libc::EINVAL);

Expand Down
3 changes: 2 additions & 1 deletion src/tools/miri/tests/pass/slices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ fn slice_of_zst() {

// In a slice of zero-size elements the pointer is meaningless.
// Ensure iteration still works even if the pointer is at the end of the address space.
let slice: &[()] = unsafe { slice::from_raw_parts(ptr::without_provenance(-5isize as usize), 10) };
let slice: &[()] =
unsafe { slice::from_raw_parts(ptr::without_provenance(-5isize as usize), 10) };
assert_eq!(slice.len(), 10);
assert_eq!(slice.iter().count(), 10);

Expand Down

0 comments on commit 6f3bc7d

Please sign in to comment.