about summary refs log tree commit diff
path: root/library/core/src/char
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-09-29 14:23:47 +0200
committerest31 <MTest31@outlook.com>2022-09-29 14:26:24 +0200
commit12c15a2bfe9f4144003366bc72e10387fbef9aab (patch)
tree0216d2b8edf8ef185f69f3c3fd6caf96f51f6343 /library/core/src/char
parent8a497b7181cad4ae66dbd6cc31042b69b6bd0df7 (diff)
downloadrust-12c15a2bfe9f4144003366bc72e10387fbef9aab.tar.gz
rust-12c15a2bfe9f4144003366bc72e10387fbef9aab.zip
Split out from_u32_unchecked from const_char_convert
It relies on the Option::unwrap function which is not const-stable (yet).
Diffstat (limited to 'library/core/src/char')
-rw-r--r--library/core/src/char/convert.rs1
-rw-r--r--library/core/src/char/methods.rs2
-rw-r--r--library/core/src/char/mod.rs2
3 files changed, 2 insertions, 3 deletions
diff --git a/library/core/src/char/convert.rs b/library/core/src/char/convert.rs
index 7c5f82f5ea4..f1a51a550f5 100644
--- a/library/core/src/char/convert.rs
+++ b/library/core/src/char/convert.rs
@@ -18,7 +18,6 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
 }
 
 /// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
-#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
 #[inline]
 #[must_use]
 pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs
index b7a63b7c675..4416602c0bd 100644
--- a/library/core/src/char/methods.rs
+++ b/library/core/src/char/methods.rs
@@ -183,7 +183,7 @@ impl char {
     /// assert_eq!('❤', c);
     /// ```
     #[stable(feature = "assoc_char_funcs", since = "1.52.0")]
-    #[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
+    #[rustc_const_unstable(feature = "const_char_from_u32_unchecked", issue = "89259")]
     #[must_use]
     #[inline]
     pub const unsafe fn from_u32_unchecked(i: u32) -> char {
diff --git a/library/core/src/char/mod.rs b/library/core/src/char/mod.rs
index b34a7121631..bb3a96a19fb 100644
--- a/library/core/src/char/mod.rs
+++ b/library/core/src/char/mod.rs
@@ -120,7 +120,7 @@ pub const fn from_u32(i: u32) -> Option<char> {
 /// Converts a `u32` to a `char`, ignoring validity. Use [`char::from_u32_unchecked`].
 /// instead.
 #[stable(feature = "char_from_unchecked", since = "1.5.0")]
-#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
+#[rustc_const_unstable(feature = "const_char_from_u32_unchecked", issue = "89259")]
 #[must_use]
 #[inline]
 pub const unsafe fn from_u32_unchecked(i: u32) -> char {