about summary refs log tree commit diff
path: root/src/libcore/str
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-08-02 22:00:13 +0100
committervarkor <github@varkor.com>2018-08-02 22:00:13 +0100
commit33067ad2011ce97e80a247c5a1a9bdb15fc4f376 (patch)
tree7e7a8eaf56eb2dfd374d568c8a83e95eba36201b /src/libcore/str
parentaecf8c2a624d45d1f881caa53c960708cc0f655a (diff)
downloadrust-33067ad2011ce97e80a247c5a1a9bdb15fc4f376.tar.gz
rust-33067ad2011ce97e80a247c5a1a9bdb15fc4f376.zip
Add #![feature(trim_direction)] to doc comments
Diffstat (limited to 'src/libcore/str')
-rw-r--r--src/libcore/str/mod.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index eda35519636..00e296be4f2 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -3604,14 +3604,17 @@ impl str {
     /// Basic usage:
     ///
     /// ```
-    /// let s = " Hello\tworld\t";
+    /// #![feature(trim_direction)]
     ///
+    /// let s = " Hello\tworld\t";
     /// assert_eq!("Hello\tworld\t", s.trim_start());
     /// ```
     ///
     /// Directionality:
     ///
     /// ```
+    /// #![feature(trim_direction)]
+    ///
     /// let s = "  English";
     /// assert!(Some('E') == s.trim_start().chars().next());
     ///
@@ -3640,14 +3643,17 @@ impl str {
     /// Basic usage:
     ///
     /// ```
-    /// let s = " Hello\tworld\t";
+    /// #![feature(trim_direction)]
     ///
+    /// let s = " Hello\tworld\t";
     /// assert_eq!(" Hello\tworld", s.trim_end());
     /// ```
     ///
     /// Directionality:
     ///
     /// ```
+    /// #![feature(trim_direction)]
+    ///
     /// let s = "English  ";
     /// assert!(Some('h') == s.trim_end().chars().rev().next());
     ///
@@ -3799,6 +3805,8 @@ impl str {
     /// Basic usage:
     ///
     /// ```
+    /// #![feature(trim_direction)]
+    ///
     /// assert_eq!("11foo1bar11".trim_start_matches('1'), "foo1bar11");
     /// assert_eq!("123foo1bar123".trim_start_matches(char::is_numeric), "foo1bar123");
     ///
@@ -3838,6 +3846,8 @@ impl str {
     /// Simple patterns:
     ///
     /// ```
+    /// #![feature(trim_direction)]
+    ///
     /// assert_eq!("11foo1bar11".trim_end_matches('1'), "11foo1bar");
     /// assert_eq!("123foo1bar123".trim_end_matches(char::is_numeric), "123foo1bar");
     ///
@@ -3848,6 +3858,8 @@ impl str {
     /// A more complex pattern, using a closure:
     ///
     /// ```
+    /// #![feature(trim_direction)]
+    ///
     /// assert_eq!("1fooX".trim_end_matches(|c| c == '1' || c == 'X'), "1foo");
     /// ```
     #[unstable(feature = "trim_direction", issue = "30459")]