Skip to content

Commit

Permalink
delete extra paren
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzech committed Aug 27, 2024
1 parent 5fac1cd commit 2e202a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
@@ -1887,7 +1887,7 @@ pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
#[safety::requires(a.is_power_of_two())]
// If T is a ZST, then answer should either be 0 or usize::MAX
#[safety::ensures(|result|
mem::size_of::<T>() != 0 || if p.addr() % a == 0 { *result == 0 } else { *result == usize::MAX})
mem::size_of::<T>() != 0 || if p.addr() % a == 0 { *result == 0 } else { *result == usize::MAX}
)]
#[safety::ensures(|result| {
// If T is not a ZST and p can be aligned, then applying result as an offest should produce an aligned address

0 comments on commit 2e202a4

Please sign in to comment.