Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
  • Loading branch information
carolynzech and zhassan-aws authored Aug 29, 2024
1 parent 2e202a4 commit e6c7ae9
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
Expand Up @@ -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
Expand Down

0 comments on commit e6c7ae9

Please sign in to comment.