Skip to content

Commit 49b9d68

Browse files
committed
Update Unicode escapes;
1 parent f5cd2c5 commit 49b9d68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: library/core/src/char/methods.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -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.

0 commit comments

Comments
 (0)