about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2016-07-18 12:08:37 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2016-07-18 18:35:08 +0200
commit7b2a03f08e930f6eaac419e203630b06e3d491e6 (patch)
treea47d8c517fb73085f4b64a8668da5cfdc63dc55d /src/libcore
parentf2e73d9d48dec8ae3103ba46a35586a2a5435a4f (diff)
downloadrust-7b2a03f08e930f6eaac419e203630b06e3d491e6.tar.gz
rust-7b2a03f08e930f6eaac419e203630b06e3d491e6.zip
Fix doctest of `ExactSizeIterator::is_empty`
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter/traits.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/iter/traits.rs b/src/libcore/iter/traits.rs
index b7ee9ba55f5..b1af3055932 100644
--- a/src/libcore/iter/traits.rs
+++ b/src/libcore/iter/traits.rs
@@ -530,7 +530,9 @@ pub trait ExactSizeIterator: Iterator {
     /// Basic usage:
     ///
     /// ```
-    /// let mut one_element = [0].iter();
+    /// #![feature(exact_size_is_empty)]
+    ///
+    /// let mut one_element = 0..1;
     /// assert!(!one_element.is_empty());
     ///
     /// assert_eq!(one_element.next(), Some(0));