diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2019-02-08 15:00:47 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2019-02-13 18:00:18 +0100 |
| commit | c80a8f51dcdc90dd8a5234f3bef6160814eee5df (patch) | |
| tree | 11ae1b5d7e96a0e76aa7ad135f5a827bd15ed226 /src/libcore/char | |
| parent | 2f7120397f5178fd3b389c2551a03991f3f4ee31 (diff) | |
| download | rust-c80a8f51dcdc90dd8a5234f3bef6160814eee5df.tar.gz rust-c80a8f51dcdc90dd8a5234f3bef6160814eee5df.zip | |
Stabilize TryFrom and TryInto
Diffstat (limited to 'src/libcore/char')
| -rw-r--r-- | src/libcore/char/convert.rs | 6 | ||||
| -rw-r--r-- | src/libcore/char/mod.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/char/convert.rs b/src/libcore/char/convert.rs index 4a1a236b669..6a5abfb408f 100644 --- a/src/libcore/char/convert.rs +++ b/src/libcore/char/convert.rs @@ -218,7 +218,7 @@ impl FromStr for char { } -#[unstable(feature = "try_from", issue = "33417")] +#[stable(feature = "try_from", since = "1.34.0")] impl TryFrom<u32> for char { type Error = CharTryFromError; @@ -233,11 +233,11 @@ impl TryFrom<u32> for char { } /// The error type returned when a conversion from u32 to char fails. -#[unstable(feature = "try_from", issue = "33417")] +#[stable(feature = "try_from", since = "1.34.0")] #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct CharTryFromError(()); -#[unstable(feature = "try_from", issue = "33417")] +#[stable(feature = "try_from", since = "1.34.0")] impl fmt::Display for CharTryFromError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { "converted integer out of range for `char`".fmt(f) diff --git a/src/libcore/char/mod.rs b/src/libcore/char/mod.rs index 15e153bdfad..f3369c4d940 100644 --- a/src/libcore/char/mod.rs +++ b/src/libcore/char/mod.rs @@ -30,7 +30,7 @@ pub use self::convert::{from_u32, from_digit}; pub use self::convert::from_u32_unchecked; #[stable(feature = "char_from_str", since = "1.20.0")] pub use self::convert::ParseCharError; -#[unstable(feature = "try_from", issue = "33417")] +#[stable(feature = "try_from", since = "1.34.0")] pub use self::convert::CharTryFromError; #[stable(feature = "decode_utf16", since = "1.9.0")] pub use self::decode::{decode_utf16, DecodeUtf16, DecodeUtf16Error}; |
