diff options
Diffstat (limited to 'library/core/src/char/mod.rs')
-rw-r--r-- | library/core/src/char/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/core/src/char/mod.rs b/library/core/src/char/mod.rs index 0df23e7bb..b34a71216 100644 --- a/library/core/src/char/mod.rs +++ b/library/core/src/char/mod.rs @@ -1,4 +1,6 @@ -//! A character type. +//! Utilities for the `char` primitive type. +//! +//! *[See also the `char` primitive type](primitive@char).* //! //! The `char` type represents a single character. More specifically, since //! 'character' isn't a well-defined concept in Unicode, `char` is a '[Unicode @@ -36,6 +38,7 @@ pub use self::methods::encode_utf16_raw; #[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")] pub use self::methods::encode_utf8_raw; +use crate::error::Error; use crate::fmt::{self, Write}; use crate::iter::FusedIterator; @@ -582,3 +585,6 @@ impl fmt::Display for TryFromCharError { "unicode code point out of range".fmt(fmt) } } + +#[stable(feature = "u8_from_char", since = "1.59.0")] +impl Error for TryFromCharError {} |