Skip to content

Commit

Permalink
fix typo
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 e6c7ae9 commit 31abde9
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 @@ -1890,7 +1890,7 @@ pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
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
// If T is not a ZST and p can be aligned, then applying result as an offset should produce an aligned address
mem::size_of::<T>() == 0 || *result == usize::MAX ||
{
let product = usize::wrapping_mul(*result, mem::size_of::<T>());
Expand Down

0 comments on commit 31abde9

Please sign in to comment.