Skip to content

Commit 31f7313

Browse files
authored
Unrolled build for rust-lang#118236
Rollup merge of rust-lang#118236 - ksw2000:update_mod_comment, r=cuviper Update mod comment The comment of `ASCII_CASE_MASK` on line 477 is `If 6th bit is set ascii is lower case.` but the original comment of `*self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)` was `Toggle the fifth bit if this is a lowercase letter`
2 parents e06c94d + 1928d82 commit 31f7313

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/num/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ impl isize {
474474
}
475475
}
476476

477-
/// If 6th bit is set ascii is lower case.
477+
/// If the 6th bit is set ascii is lower case.
478478
const ASCII_CASE_MASK: u8 = 0b0010_0000;
479479

480480
impl u8 {
@@ -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)