@@ -69,7 +69,7 @@ impl char {
6969 /// assert_eq!(char::from_u32(value_at_max + 1), None);
7070 /// ```
7171 #[ stable( feature = "assoc_char_consts" , since = "1.52.0" ) ]
72- pub const MAX : char = '\u{10ffff }' ;
72+ pub const MAX : char = '\u{10FFFF }' ;
7373
7474 /// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a
7575 /// decoding error.
@@ -847,7 +847,7 @@ impl char {
847847 /// assert!('\n'.is_whitespace());
848848 ///
849849 /// // a non-breaking space
850- /// assert!('\u{A0 }'.is_whitespace());
850+ /// assert!('\u{00A0 }'.is_whitespace());
851851 ///
852852 /// assert!(!'越'.is_whitespace());
853853 /// ```
@@ -1015,7 +1015,7 @@ impl char {
10151015 /// Both are equivalent to:
10161016 ///
10171017 /// ```
1018- /// println!("i\u{307 }");
1018+ /// println!("i\u{0307 }");
10191019 /// ```
10201020 ///
10211021 /// Using [`to_string`](../std/string/trait.ToString.html#tymethod.to_string):
@@ -1024,7 +1024,7 @@ impl char {
10241024 /// assert_eq!('C'.to_lowercase().to_string(), "c");
10251025 ///
10261026 /// // Sometimes the result is more than one character:
1027- /// assert_eq!('İ'.to_lowercase().to_string(), "i\u{307 }");
1027+ /// assert_eq!('İ'.to_lowercase().to_string(), "i\u{0307 }");
10281028 ///
10291029 /// // Characters that do not have both uppercase and lowercase
10301030 /// // convert into themselves.
@@ -1837,7 +1837,6 @@ pub const fn encode_utf16_raw(mut code: u32, dst: &mut [u16]) -> &mut [u16] {
18371837 }
18381838 ( 2 , [ a, b, ..] ) => {
18391839 code -= 0x1_0000 ;
1840-
18411840 * a = ( code >> 10 ) as u16 | 0xD800 ;
18421841 * b = ( code & 0x3FF ) as u16 | 0xDC00 ;
18431842 }
0 commit comments