Skip to content

Commit 4caff13

Browse files
committedNov 4, 2024
Stabilise 'const_char_encode_utf16';
1 parent 84fae7e commit 4caff13

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎core/src/char/methods.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ impl char {
711711
/// '𝕊'.encode_utf16(&mut b);
712712
/// ```
713713
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
714-
#[rustc_const_unstable(feature = "const_char_encode_utf16", issue = "130660")]
714+
#[rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")]
715715
#[inline]
716716
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
717717
encode_utf16_raw(self as u32, dst)
@@ -1819,7 +1819,10 @@ pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
18191819
/// Panics if the buffer is not large enough.
18201820
/// A buffer of length 2 is large enough to encode any `char`.
18211821
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
1822-
#[rustc_const_unstable(feature = "const_char_encode_utf16", issue = "130660")]
1822+
#[cfg_attr(
1823+
bootstrap,
1824+
rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")
1825+
)]
18231826
#[doc(hidden)]
18241827
#[inline]
18251828
pub const fn encode_utf16_raw(mut code: u32, dst: &mut [u16]) -> &mut [u16] {

‎core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
#![feature(const_align_of_val_raw)]
115115
#![feature(const_alloc_layout)]
116116
#![feature(const_black_box)]
117-
#![feature(const_char_encode_utf16)]
118117
#![feature(const_eval_select)]
119118
#![feature(const_exact_div)]
120119
#![feature(const_float_methods)]

0 commit comments

Comments
 (0)
Please sign in to comment.