Skip to content

Commit 7b2a03f

Browse files
committed
Fix doctest of ExactSizeIterator::is_empty
1 parent f2e73d9 commit 7b2a03f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libcore/iter/traits.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ pub trait ExactSizeIterator: Iterator {
530530
/// Basic usage:
531531
///
532532
/// ```
533-
/// let mut one_element = [0].iter();
533+
/// #![feature(exact_size_is_empty)]
534+
///
535+
/// let mut one_element = 0..1;
534536
/// assert!(!one_element.is_empty());
535537
///
536538
/// assert_eq!(one_element.next(), Some(0));

0 commit comments

Comments
 (0)