Clarify documentation on char::MAX

This commit is contained in:
George Bateman 2022-01-27 22:13:01 +00:00
parent 8cdb3cd94e
commit 2fb617ca0f
No known key found for this signature in database
GPG Key ID: C417AA9C4039EFCF

View File

@ -9,11 +9,11 @@ use super::*;
#[lang = "char"] #[lang = "char"]
impl char { impl char {
/// The highest valid code point a `char` can have. /// The highest valid code point a `char` can have, 0x10FFFF.
/// ///
/// A `char` is a [Unicode Scalar Value], which means that it is a [Code /// A [Code Point] is any value between zero and `char::MAX`, inclusive. A
/// Point], but only ones within a certain range. `MAX` is the highest valid /// `char` is a [Unicode Scalar Value], which is a Code Point that is not
/// code point that's a valid [Unicode Scalar Value]. /// in the range `0xD800..=0xDFFF`.
/// ///
/// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value /// [Unicode Scalar Value]: https://www.unicode.org/glossary/#unicode_scalar_value
/// [Code Point]: https://www.unicode.org/glossary/#code_point /// [Code Point]: https://www.unicode.org/glossary/#code_point