diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-01-25 22:37:00 -0500 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2016-01-25 22:37:00 -0500 |
| commit | 2d0e4ed0aaa422c0fa6e797c635f22aa607469b0 (patch) | |
| tree | 34b1e4841c328bfcfcc461e3c84eda30264d55a4 /src/libcore | |
| parent | 0486e12ad0661adcfdbd926dea17d7edfda419c1 (diff) | |
| download | rust-2d0e4ed0aaa422c0fa6e797c635f22aa607469b0.tar.gz rust-2d0e4ed0aaa422c0fa6e797c635f22aa607469b0.zip | |
Describe next_back() wrt Iterator protocol
Fixes #30633
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/iter.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index e3e783329ec..ddc4fb32cde 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -2740,7 +2740,13 @@ pub trait Extend<A> { /// It is important to note that both back and forth work on the same range, /// and do not cross: iteration is over when they meet in the middle. /// +/// In a similar fashion to the [`Iterator`] protocol, once a +/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again +/// may or may not ever return `Some` again. `next()` and `next_back()` are +/// interchangable for this purpose. +/// /// [`Iterator`]: trait.Iterator.html +/// /// # Examples /// /// Basic usage: |
