diff options
| author | bors <bors@rust-lang.org> | 2014-07-23 21:41:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-07-23 21:41:14 +0000 |
| commit | fb72c4767fa423649feeb197b50385c1fa0a6fd5 (patch) | |
| tree | 85beee9373b61bc02cc53b94d11fe128e9ab2f1b /src/liballoc | |
| parent | b3a732a3eab60862068b1006973de5924bcda9e2 (diff) | |
| parent | 71a75cc2ce6d6eed2557e6c585e81abcdad86827 (diff) | |
| download | rust-fb72c4767fa423649feeb197b50385c1fa0a6fd5.tar.gz rust-fb72c4767fa423649feeb197b50385c1fa0a6fd5.zip | |
auto merge of #15611 : brson/rust/pushpop, r=alexcrichton
This fixes naming conventions for `push`/`pop` from either end of a structure by partially implementing @erickt's suggestion from https://github.com/rust-lang/rust/issues/10852#issuecomment-30823343, namely: * push/pop from the 'back' are called `push` and `pop`. * push/pop from the 'front' are called `push_front` and `pop_front`. * `push`/`pop` are declared on the `MutableSeq` trait. * Implement `MutableSeq` for `Vec`, `DList`, and `RingBuf`. * Add `MutableSeq` to the prelude. I did not make any further refactorings because there is some more extensive thought that needs to be put into the collections traits. This is an easy first step that should close https://github.com/rust-lang/rust/issues/10852. I left the `push_back` and `pop_back` methods on `DList` and `RingBuf` deprecated. Because `MutableSeq` is in the prelude it shouldn't break many, but it is a breaking change.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 9b4f879e61e..27174de8e74 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -268,6 +268,7 @@ impl<T: Share + Send> Drop for Weak<T> { #[allow(experimental)] mod tests { use std::clone::Clone; + use std::collections::MutableSeq; use std::comm::channel; use std::mem::drop; use std::ops::Drop; |
