Skip to content

Commit 176c44c

Browse files
committed
Stabilize const_char_convert
1 parent 12c15a2 commit 176c44c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

library/core/src/char/methods.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl char {
140140
/// assert_eq!(None, c);
141141
/// ```
142142
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
143-
#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
143+
#[rustc_const_stable(feature = "const_char_convert", since = "CURRENT_RUSTC_VERSION")]
144144
#[must_use]
145145
#[inline]
146146
pub const fn from_u32(i: u32) -> Option<char> {
@@ -241,7 +241,7 @@ impl char {
241241
/// let _c = char::from_digit(1, 37);
242242
/// ```
243243
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
244-
#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
244+
#[rustc_const_stable(feature = "const_char_convert", since = "CURRENT_RUSTC_VERSION")]
245245
#[must_use]
246246
#[inline]
247247
pub const fn from_digit(num: u32, radix: u32) -> Option<char> {
@@ -338,7 +338,7 @@ impl char {
338338
/// let _ = '1'.to_digit(37);
339339
/// ```
340340
#[stable(feature = "rust1", since = "1.0.0")]
341-
#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
341+
#[rustc_const_stable(feature = "const_char_convert", since = "CURRENT_RUSTC_VERSION")]
342342
#[must_use = "this returns the result of the operation, \
343343
without modifying the original"]
344344
#[inline]

library/core/src/char/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into
110110

111111
/// Converts a `u32` to a `char`. Use [`char::from_u32`] instead.
112112
#[stable(feature = "rust1", since = "1.0.0")]
113-
#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
113+
#[rustc_const_stable(feature = "const_char_convert", since = "CURRENT_RUSTC_VERSION")]
114114
#[must_use]
115115
#[inline]
116116
pub const fn from_u32(i: u32) -> Option<char> {
@@ -130,7 +130,7 @@ pub const unsafe fn from_u32_unchecked(i: u32) -> char {
130130

131131
/// Converts a digit in the given radix to a `char`. Use [`char::from_digit`] instead.
132132
#[stable(feature = "rust1", since = "1.0.0")]
133-
#[rustc_const_unstable(feature = "const_char_convert", issue = "89259")]
133+
#[rustc_const_stable(feature = "const_char_convert", since = "CURRENT_RUSTC_VERSION")]
134134
#[must_use]
135135
#[inline]
136136
pub const fn from_digit(num: u32, radix: u32) -> Option<char> {

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
#![feature(const_black_box)]
105105
#![feature(const_caller_location)]
106106
#![feature(const_cell_into_inner)]
107-
#![feature(const_char_convert)]
108107
#![feature(const_char_from_u32_unchecked)]
109108
#![feature(const_clone)]
110109
#![feature(const_cmp)]

0 commit comments

Comments
 (0)