Stabilize const unchecked conversion from u32 to char · model-checking/verify-rust-std@0fe5362 (original) (raw)

3 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -223,7 +223,10 @@ impl char {
223 223 /// assert_eq!('❤', c);
224 224 /// ```
225 225 #[stable(feature = "assoc_char_funcs", since = "1.52.0")]
226 -#[rustc_const_unstable(feature = "const_char_from_u32_unchecked", issue = "89259")]
226 +#[rustc_const_stable(
227 + feature = "const_char_from_u32_unchecked",
228 + since = "CURRENT_RUSTC_VERSION"
229 + )]
227 230 #[must_use]
228 231 #[inline]
229 232 pub const unsafe fn from_u32_unchecked(i: u32) -> char {
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ pub const fn from_u32(i: u32) -> Option {
123 123 /// Converts a `u32` to a `char`, ignoring validity. Use [`char::from_u32_unchecked`].
124 124 /// instead.
125 125 #[stable(feature = "char_from_unchecked", since = "1.5.0")]
126 -#[rustc_const_unstable(feature = "const_char_from_u32_unchecked", issue = "89259")]
126 +#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "CURRENT_RUSTC_VERSION")]
127 127 #[must_use]
128 128 #[inline]
129 129 pub const unsafe fn from_u32_unchecked(i: u32) -> char {
Original file line number Diff line number Diff line change
@@ -122,7 +122,6 @@
122 122 #![feature(const_bigint_helper_methods)]
123 123 #![feature(const_black_box)]
124 124 #![feature(const_cell_into_inner)]
125 -#![feature(const_char_from_u32_unchecked)]
126 125 #![feature(const_eval_select)]
127 126 #![feature(const_exact_div)]
128 127 #![feature(const_float_bits_conv)]