about summary refs log tree commit diff
path: root/src/libstd_unicode
diff options
context:
space:
mode:
authorLukas Kalbertodt <lukas.kalbertodt@gmail.com>2017-10-03 17:39:31 +0200
committerLukas Kalbertodt <lukas.kalbertodt@gmail.com>2017-11-03 21:28:04 +0100
commit259c125267fb8334ae7f70f4e1d1c2e0d9a56d59 (patch)
treecd89ce806709c21f4fd6391c97f7047ebc268f98 /src/libstd_unicode
parentda57580736c6d30fec6c4e4442bc5376ac81f245 (diff)
downloadrust-259c125267fb8334ae7f70f4e1d1c2e0d9a56d59.tar.gz
rust-259c125267fb8334ae7f70f4e1d1c2e0d9a56d59.zip
Mark several ascii methods as unstable again
We don't want to stabilize them now already. The goal of this set of
commits is just to add inherent methods to the four types. Stabilizing
all of those methods can be done later.
Diffstat (limited to 'src/libstd_unicode')
-rw-r--r--src/libstd_unicode/char.rs40
-rw-r--r--src/libstd_unicode/lib.rs1
2 files changed, 31 insertions, 10 deletions
diff --git a/src/libstd_unicode/char.rs b/src/libstd_unicode/char.rs
index a9f46f17790..c012bdcb6db 100644
--- a/src/libstd_unicode/char.rs
+++ b/src/libstd_unicode/char.rs
@@ -1084,6 +1084,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1104,7 +1106,7 @@ impl char {
     /// assert!(!lf.is_ascii_alphabetic());
     /// assert!(!esc.is_ascii_alphabetic());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_alphabetic(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_alphabetic()
@@ -1116,6 +1118,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1136,7 +1140,7 @@ impl char {
     /// assert!(!lf.is_ascii_uppercase());
     /// assert!(!esc.is_ascii_uppercase());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_uppercase(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_uppercase()
@@ -1148,6 +1152,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1168,7 +1174,7 @@ impl char {
     /// assert!(!lf.is_ascii_lowercase());
     /// assert!(!esc.is_ascii_lowercase());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_lowercase(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_lowercase()
@@ -1183,6 +1189,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1203,7 +1211,7 @@ impl char {
     /// assert!(!lf.is_ascii_alphanumeric());
     /// assert!(!esc.is_ascii_alphanumeric());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_alphanumeric(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_alphanumeric()
@@ -1215,6 +1223,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1235,7 +1245,7 @@ impl char {
     /// assert!(!lf.is_ascii_digit());
     /// assert!(!esc.is_ascii_digit());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_digit(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_digit()
@@ -1250,6 +1260,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1270,7 +1282,7 @@ impl char {
     /// assert!(!lf.is_ascii_hexdigit());
     /// assert!(!esc.is_ascii_hexdigit());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_hexdigit(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_hexdigit()
@@ -1286,6 +1298,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1306,7 +1320,7 @@ impl char {
     /// assert!(!lf.is_ascii_punctuation());
     /// assert!(!esc.is_ascii_punctuation());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_punctuation(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_punctuation()
@@ -1318,6 +1332,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1338,7 +1354,7 @@ impl char {
     /// assert!(!lf.is_ascii_graphic());
     /// assert!(!esc.is_ascii_graphic());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_graphic(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_graphic()
@@ -1367,6 +1383,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1387,7 +1405,7 @@ impl char {
     /// assert!(lf.is_ascii_whitespace());
     /// assert!(!esc.is_ascii_whitespace());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_whitespace(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_whitespace()
@@ -1401,6 +1419,8 @@ impl char {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ascii_ctype)]
+    ///
     /// let uppercase_a = 'A';
     /// let uppercase_g = 'G';
     /// let a = 'a';
@@ -1421,7 +1441,7 @@ impl char {
     /// assert!(lf.is_ascii_control());
     /// assert!(esc.is_ascii_control());
     /// ```
-    #[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
+    #[unstable(feature = "ascii_ctype", issue = "39658")]
     #[inline]
     pub fn is_ascii_control(&self) -> bool {
         self.is_ascii() && (*self as u8).is_ascii_control()
diff --git a/src/libstd_unicode/lib.rs b/src/libstd_unicode/lib.rs
index e5a114caed0..65058b6554a 100644
--- a/src/libstd_unicode/lib.rs
+++ b/src/libstd_unicode/lib.rs
@@ -30,6 +30,7 @@
 #![deny(warnings)]
 #![no_std]
 
+#![feature(ascii_ctype)]
 #![feature(core_char_ext)]
 #![feature(str_internals)]
 #![feature(decode_utf8)]