diff options
| author | bors <bors@rust-lang.org> | 2016-01-26 07:42:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-01-26 07:42:10 +0000 |
| commit | acf4aeeda06b5355060e3dd8316e096465242f94 (patch) | |
| tree | 812b6e0d57a0f74ed7e698db3133b8d86615b314 /src/libcore | |
| parent | faf6d1e87391b25196b35909c3c95e5d873cacf0 (diff) | |
| parent | 79157b3fb5d534500caf9c5f2a40161bea01e79d (diff) | |
| download | rust-acf4aeeda06b5355060e3dd8316e096465242f94.tar.gz rust-acf4aeeda06b5355060e3dd8316e096465242f94.zip | |
Auto merge of #31210 - Manishearth:rollup, r=Manishearth
- Successful merges: #31152, #31184, #31189, #31192, #31197, #31199, #31201 - Failed merges:
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cell.rs | 4 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 789b75836d0..6041355e9db 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -414,7 +414,9 @@ impl<T: ?Sized> RefCell<T> { /// /// let c = RefCell::new(5); /// - /// let borrowed_five = c.borrow_mut(); + /// *c.borrow_mut() = 7; + /// + /// assert_eq!(*c.borrow(), 7); /// ``` /// /// An example of panic: 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: |
