about summary refs log tree commit diff
path: root/src/libcore/cmp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/cmp.rs')
-rw-r--r--src/libcore/cmp.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index b37bad5f754..9ab8ab8672d 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -19,7 +19,8 @@
 //! could do the following:
 //!
 //! ```
-//! use core::num::SignedInt;
+//! # #![feature(core)]
+//! use std::num::SignedInt;
 //!
 //! struct FuzzyNum {
 //!     num: i32,
@@ -398,6 +399,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
 /// # Examples
 ///
 /// ```
+/// # #![feature(core)]
 /// use std::cmp;
 ///
 /// assert_eq!(Some(1), cmp::partial_min(1, 2));
@@ -407,6 +409,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
 /// When comparison is impossible:
 ///
 /// ```
+/// # #![feature(core)]
 /// use std::cmp;
 ///
 /// let result = cmp::partial_min(std::f64::NAN, 1.0);
@@ -429,6 +432,7 @@ pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
 /// # Examples
 ///
 /// ```
+/// # #![feature(core)]
 /// use std::cmp;
 ///
 /// assert_eq!(Some(2), cmp::partial_max(1, 2));
@@ -438,6 +442,7 @@ pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
 /// When comparison is impossible:
 ///
 /// ```
+/// # #![feature(core)]
 /// use std::cmp;
 ///
 /// let result = cmp::partial_max(std::f64::NAN, 1.0);