diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-02 14:53:18 -0700 |
| commit | 7ae802f57bf8a1ac2a47760a936c56e6fff16821 (patch) | |
| tree | a6063128be15d8bb988d61b4ce695eafd8fb1ec6 /src/libcollections | |
| parent | ebe4da971aa4b2a9db597b682b96133f373dbec5 (diff) | |
| parent | 58bea31ca0e11bf49439d33e1d21f11de7161567 (diff) | |
| download | rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.tar.gz rust-7ae802f57bf8a1ac2a47760a936c56e6fff16821.zip | |
rollup merge of #17666 : eddyb/take-garbage-out
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/lib.rs | 2 | ||||
| -rw-r--r-- | src/libcollections/ringbuf.rs | 44 |
2 files changed, 1 insertions, 45 deletions
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 8b9a0ec796e..64369855ef8 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -19,7 +19,7 @@ html_root_url = "http://doc.rust-lang.org/master/", html_playground_url = "http://play.rust-lang.org/")] -#![feature(macro_rules, managed_boxes, default_type_params, phase, globs)] +#![feature(macro_rules, default_type_params, phase, globs)] #![feature(unsafe_destructor, import_shadowing)] #![no_std] diff --git a/src/libcollections/ringbuf.rs b/src/libcollections/ringbuf.rs index 02c8af2c470..33f3a08020d 100644 --- a/src/libcollections/ringbuf.rs +++ b/src/libcollections/ringbuf.rs @@ -532,7 +532,6 @@ impl<T: fmt::Show> fmt::Show for RingBuf<T> { mod tests { use std::fmt::Show; use std::prelude::*; - use std::gc::{GC, Gc}; use std::hash; use test::Bencher; use test; @@ -587,43 +586,6 @@ mod tests { assert_eq!(*d.get(3), 4); } - #[test] - #[allow(deprecated)] - fn test_boxes() { - let a: Gc<int> = box(GC) 5; - let b: Gc<int> = box(GC) 72; - let c: Gc<int> = box(GC) 64; - let d: Gc<int> = box(GC) 175; - - let mut deq = RingBuf::new(); - assert_eq!(deq.len(), 0); - deq.push_front(a); - deq.push_front(b); - deq.push(c); - assert_eq!(deq.len(), 3); - deq.push(d); - assert_eq!(deq.len(), 4); - assert_eq!(deq.front(), Some(&b)); - assert_eq!(deq.back(), Some(&d)); - assert_eq!(deq.pop_front(), Some(b)); - assert_eq!(deq.pop(), Some(d)); - assert_eq!(deq.pop(), Some(c)); - assert_eq!(deq.pop(), Some(a)); - assert_eq!(deq.len(), 0); - deq.push(c); - assert_eq!(deq.len(), 1); - deq.push_front(b); - assert_eq!(deq.len(), 2); - deq.push(d); - assert_eq!(deq.len(), 3); - deq.push_front(a); - assert_eq!(deq.len(), 4); - assert_eq!(*deq.get(0), a); - assert_eq!(*deq.get(1), b); - assert_eq!(*deq.get(2), c); - assert_eq!(*deq.get(3), d); - } - #[cfg(test)] fn test_parameterized<T:Clone + PartialEq + Show>(a: T, b: T, c: T, d: T) { let mut deq = RingBuf::new(); @@ -756,12 +718,6 @@ mod tests { } #[test] - fn test_param_at_int() { - test_parameterized::<Gc<int>>(box(GC) 5, box(GC) 72, - box(GC) 64, box(GC) 175); - } - - #[test] fn test_param_taggy() { test_parameterized::<Taggy>(One(1), Two(1, 2), Three(1, 2, 3), Two(17, 42)); } |
