about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2024-06-25 10:55:33 -0700
committerDavid Tolnay <dtolnay@gmail.com>2024-06-25 10:56:20 -0700
commit9d3c79bcd01d444a1e075e15a71e31d4ef6ab0d8 (patch)
treeca91d2f2efd2cea5df569e1c47b39b471f0f5a05 /library/core
parentd929a42a664c026167800801b26d734db925314f (diff)
downloadrust-9d3c79bcd01d444a1e075e15a71e31d4ef6ab0d8.tar.gz
rust-9d3c79bcd01d444a1e075e15a71e31d4ef6ab0d8.zip
Stabilize const unchecked conversion from u32 to char
Diffstat (limited to 'library/core')
-rw-r--r--library/core/src/char/methods.rs5
-rw-r--r--library/core/src/char/mod.rs2
-rw-r--r--library/core/src/lib.rs1
3 files changed, 5 insertions, 3 deletions
diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs
index 458be49fb15..4186565c131 100644
--- a/library/core/src/char/methods.rs
+++ b/library/core/src/char/methods.rs
@@ -223,7 +223,10 @@ impl char {
     /// assert_eq!('❤', c);
     /// ```
     #[stable(feature = "assoc_char_funcs", since = "1.52.0")]
-    #[rustc_const_unstable(feature = "const_char_from_u32_unchecked", issue = "89259")]
+    #[rustc_const_stable(
+        feature = "const_char_from_u32_unchecked",
+        since = "CURRENT_RUSTC_VERSION"
+    )]
     #[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 f3683fe3f9c..26b463e25ea 100644
--- a/library/core/src/char/mod.rs
+++ b/library/core/src/char/mod.rs
@@ -123,7 +123,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_from_u32_unchecked", issue = "89259")]
+#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "CURRENT_RUSTC_VERSION")]
 #[must_use]
 #[inline]
 pub const unsafe fn from_u32_unchecked(i: u32) -> char {
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index d1692729a31..a5df782c189 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -122,7 +122,6 @@
 #![feature(const_bigint_helper_methods)]
 #![feature(const_black_box)]
 #![feature(const_cell_into_inner)]
-#![feature(const_char_from_u32_unchecked)]
 #![feature(const_eval_select)]
 #![feature(const_exact_div)]
 #![feature(const_float_bits_conv)]