Skip to content

Commit

Permalink
Rollup merge of #98561 - Wilfred:patch-4, r=fee1-dead
Browse files Browse the repository at this point in the history
Fix spelling in SAFETY comment

"can not" should be "cannot", and add punctuation.
  • Loading branch information
matthiaskrgr authored Jun 27, 2022
2 parents 31ec973 + 1c1ae78 commit 54b81dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ macro_rules! nonzero_leading_trailing_zeros {
without modifying the original"]
#[inline]
pub const fn leading_zeros(self) -> u32 {
// SAFETY: since `self` can not be zero it is safe to call ctlz_nonzero
// SAFETY: since `self` cannot be zero, it is safe to call `ctlz_nonzero`.
unsafe { intrinsics::ctlz_nonzero(self.0 as $Uint) as u32 }
}

Expand All @@ -237,7 +237,7 @@ macro_rules! nonzero_leading_trailing_zeros {
without modifying the original"]
#[inline]
pub const fn trailing_zeros(self) -> u32 {
// SAFETY: since `self` can not be zero it is safe to call cttz_nonzero
// SAFETY: since `self` cannot be zero, it is safe to call `cttz_nonzero`.
unsafe { intrinsics::cttz_nonzero(self.0 as $Uint) as u32 }
}

Expand Down

0 comments on commit 54b81dd

Please sign in to comment.