diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2018-04-05 15:45:33 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2018-04-12 00:13:43 +0200 |
| commit | ae6adf335c88cad4e4a1805a805ac49dd1350174 (patch) | |
| tree | de76138105b635d9001fcc22767f96b9662b8d9d /src/libstd_unicode | |
| parent | ad610bed83f43158892222a71336bdcaa167909a (diff) | |
| download | rust-ae6adf335c88cad4e4a1805a805ac49dd1350174.tar.gz rust-ae6adf335c88cad4e4a1805a805ac49dd1350174.zip | |
Move char::REPLACEMENT_CHARACTER to libcore
Diffstat (limited to 'src/libstd_unicode')
| -rw-r--r-- | src/libstd_unicode/char.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs index 33e47ade8cb..460f83d875a 100644 --- a/src/libstd_unicode/char.rs +++ b/src/libstd_unicode/char.rs @@ -38,6 +38,8 @@ use tables::{conversions, derived_property, general_category, property}; pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::char::{EscapeDebug, EscapeDefault, EscapeUnicode}; +#[stable(feature = "decode_utf16", since = "1.9.0")] +pub use core::char::REPLACEMENT_CHARACTER; #[stable(feature = "char_from_str", since = "1.20.0")] pub use core::char::ParseCharError; @@ -1581,11 +1583,3 @@ impl fmt::Display for DecodeUtf16Error { write!(f, "unpaired surrogate found: {:x}", self.code) } } - -/// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a -/// decoding error. -/// -/// It can occur, for example, when giving ill-formed UTF-8 bytes to -/// [`String::from_utf8_lossy`](../../std/string/struct.String.html#method.from_utf8_lossy). -#[stable(feature = "decode_utf16", since = "1.9.0")] -pub const REPLACEMENT_CHARACTER: char = '\u{FFFD}'; |
