about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2015-07-24 00:45:21 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2015-07-24 01:58:38 +0200
commitc2fca7c95742cdd25198eae42d233d49db7026ea (patch)
tree22d7652e2273169c33828a07b798d4d4d593cc59
parent0eb552a835500ed964836a8e0e3111843bff8aa1 (diff)
downloadrust-c2fca7c95742cdd25198eae42d233d49db7026ea.tar.gz
rust-c2fca7c95742cdd25198eae42d233d49db7026ea.zip
Add unstable attribute to `char::from_u32_unchecked`
-rw-r--r--src/libcore/char.rs1
-rw-r--r--src/libstd/lib.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs
index 84a0ed5ab3f..c6d0e97a0cd 100644
--- a/src/libcore/char.rs
+++ b/src/libcore/char.rs
@@ -91,6 +91,7 @@ pub fn from_u32(i: u32) -> Option<char> {
 /// 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 82bc1314ad5..03e61247a83 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)]