Skip to content

Commit e9f628e

Browse files
committed
Update comment for consistent context logic.
1 parent 41fe75e commit e9f628e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/num/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ impl u8 {
549549
#[rustc_const_stable(feature = "const_ascii_methods_on_intrinsics", since = "1.52.0")]
550550
#[inline]
551551
pub const fn to_ascii_uppercase(&self) -> u8 {
552-
// Toggle the fifth bit if this is a lowercase letter
552+
// Toggle the 6th bit if this is a lowercase letter
553553
*self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)
554554
}
555555

@@ -574,7 +574,7 @@ impl u8 {
574574
#[rustc_const_stable(feature = "const_ascii_methods_on_intrinsics", since = "1.52.0")]
575575
#[inline]
576576
pub const fn to_ascii_lowercase(&self) -> u8 {
577-
// Set the fifth bit if this is an uppercase letter
577+
// Set the 6th bit if this is an uppercase letter
578578
*self | (self.is_ascii_uppercase() as u8 * ASCII_CASE_MASK)
579579
}
580580

0 commit comments

Comments
 (0)