about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarcin Fatyga <marcinf@google.com>2016-10-22 12:44:24 +0200
committerMarcin Fatyga <marcinf@google.com>2016-10-22 20:43:28 +0200
commit634715a736236ba797036d76aed872ff03277fd7 (patch)
tree65059f65c8b60badf9f4754adb18253390b29618
parentc78a2121105736e951bbbae1cfe48b7874144cf6 (diff)
downloadrust-634715a736236ba797036d76aed872ff03277fd7.tar.gz
rust-634715a736236ba797036d76aed872ff03277fd7.zip
Actually fix doctests.
-rw-r--r--src/libcore/cmp.rs6
-rw-r--r--src/libcore/lib.rs1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index d4566b5a694..7d4b0139d9b 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -252,6 +252,8 @@ impl Ordering {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ordering_chaining)]
+    ///
     /// use std::cmp::Ordering;
     ///
     /// let result = Ordering::Equal.or(Ordering::Less);
@@ -268,7 +270,7 @@ impl Ordering {
     ///
     /// let x: (i64, i64, i64) = (1, 2, 7);
     /// let y: (i64, i64, i64) = (1, 5, 3);
-    /// let result = x.0.cmp(y.0).or(x.1.cmp(y.1)).or(x.2.cmp(y.2));
+    /// let result = x.0.cmp(&y.0).or(x.1.cmp(&y.1)).or(x.2.cmp(&y.2));
     ///
     /// assert_eq!(result, Ordering::Less);
     /// ```
@@ -288,6 +290,8 @@ impl Ordering {
     /// # Examples
     ///
     /// ```
+    /// #![feature(ordering_chaining)]
+    ///
     /// use std::cmp::Ordering;
     ///
     /// let result = Ordering::Equal.or_else(|| Ordering::Less);
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 26eae84dee8..1ae4cf8e5ef 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -92,7 +92,6 @@
 #![feature(question_mark)]
 #![feature(never_type)]
 #![feature(prelude_import)]
-#![feature(ordering_chaining)]
 
 #[prelude_import]
 #[allow(unused)]