From c2fca7c95742cdd25198eae42d233d49db7026ea Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Fri, 24 Jul 2015 00:45:21 +0200 Subject: [PATCH] Add unstable attribute to `char::from_u32_unchecked` --- src/libcore/char.rs | 1 + src/libstd/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 84a0ed5ab3f5..c6d0e97a0cd0 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -91,6 +91,7 @@ pub fn from_u32(i: u32) -> Option { /// Converts a `u32` to an `char`, not checking whether it is a valid unicode /// codepoint. #[inline] +#[unstable(feature = "char_from_unchecked", reason = "recently added API")] pub unsafe fn from_u32_unchecked(i: u32) -> char { transmute(i) } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 82bc1314ad54..03e61247a835 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -209,6 +209,7 @@ #![feature(borrow_state)] #![feature(box_raw)] #![feature(box_syntax)] +#![feature(char_from_unchecked)] #![feature(char_internals)] #![feature(clone_from_slice)] #![feature(collections)]