diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-08-29 14:33:08 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-08-29 14:33:08 -0700 |
| commit | d15d55973946f8f582ba69b1789b5b5d35da5b2d (patch) | |
| tree | 3196e1d3caa8f8d86948f8bb20b8ddffb5d892ec /src/libcollections | |
| parent | 51d0d0641000d642b257beb2fe53f5174a7879d5 (diff) | |
| download | rust-d15d55973946f8f582ba69b1789b5b5d35da5b2d.tar.gz rust-d15d55973946f8f582ba69b1789b5b5d35da5b2d.zip | |
Register new snapshots
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/dlist.rs | 19 | ||||
| -rw-r--r-- | src/libcollections/lib.rs | 3 | ||||
| -rw-r--r-- | src/libcollections/priority_queue.rs | 7 | ||||
| -rw-r--r-- | src/libcollections/ringbuf.rs | 19 | ||||
| -rw-r--r-- | src/libcollections/smallintmap.rs | 18 | ||||
| -rw-r--r-- | src/libcollections/treemap.rs | 102 | ||||
| -rw-r--r-- | src/libcollections/trie.rs | 20 |
7 files changed, 0 insertions, 188 deletions
diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index 51566dc75f0..643da970364 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -49,16 +49,7 @@ struct Node<T> { value: T, } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Items<'a, T> { - head: &'a Link<T>, - tail: Rawlink<Node<T>>, - nelem: uint, -} - /// An iterator over references to the items of a `DList`. -#[cfg(not(stage0))] pub struct Items<'a, T:'a> { head: &'a Link<T>, tail: Rawlink<Node<T>>, @@ -70,17 +61,7 @@ impl<'a, T> Clone for Items<'a, T> { fn clone(&self) -> Items<'a, T> { *self } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct MutItems<'a, T> { - list: &'a mut DList<T>, - head: Rawlink<Node<T>>, - tail: Rawlink<Node<T>>, - nelem: uint, -} - /// An iterator over mutable references to the items of a `DList`. -#[cfg(not(stage0))] pub struct MutItems<'a, T:'a> { list: &'a mut DList<T>, head: Rawlink<Node<T>>, diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index a98d9ddb9db..175597c77f6 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -23,9 +23,6 @@ #![feature(unsafe_destructor, import_shadowing)] #![no_std] -// NOTE(stage0, pcwalton): Remove after snapshot. -#![allow(unknown_features)] - #[phase(plugin, link)] extern crate core; extern crate unicode; extern crate alloc; diff --git a/src/libcollections/priority_queue.rs b/src/libcollections/priority_queue.rs index 905078ccc3c..da8cf085218 100644 --- a/src/libcollections/priority_queue.rs +++ b/src/libcollections/priority_queue.rs @@ -515,14 +515,7 @@ impl<T: Ord> PriorityQueue<T> { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Items <'a, T> { - iter: slice::Items<'a, T>, -} - /// `PriorityQueue` iterator. -#[cfg(not(stage0))] pub struct Items <'a, T:'a> { iter: slice::Items<'a, T>, } diff --git a/src/libcollections/ringbuf.rs b/src/libcollections/ringbuf.rs index a2db0027dee..c71367265db 100644 --- a/src/libcollections/ringbuf.rs +++ b/src/libcollections/ringbuf.rs @@ -293,17 +293,7 @@ impl<T> RingBuf<T> { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Items<'a, T> { - lo: uint, - index: uint, - rindex: uint, - elts: &'a [Option<T>], -} - /// `RingBuf` iterator. -#[cfg(not(stage0))] pub struct Items<'a, T:'a> { lo: uint, index: uint, @@ -358,16 +348,7 @@ impl<'a, T> RandomAccessIterator<&'a T> for Items<'a, T> { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct MutItems<'a, T> { - remaining1: &'a mut [Option<T>], - remaining2: &'a mut [Option<T>], - nelts: uint, -} - /// `RingBuf` mutable iterator. -#[cfg(not(stage0))] pub struct MutItems<'a, T:'a> { remaining1: &'a mut [Option<T>], remaining2: &'a mut [Option<T>], diff --git a/src/libcollections/smallintmap.rs b/src/libcollections/smallintmap.rs index 5ef1dd2ab22..b3b3bb1ea22 100644 --- a/src/libcollections/smallintmap.rs +++ b/src/libcollections/smallintmap.rs @@ -489,16 +489,7 @@ macro_rules! double_ended_iterator { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Entries<'a, T> { - front: uint, - back: uint, - iter: slice::Items<'a, Option<T>> -} - /// Forward iterator over a map. -#[cfg(not(stage0))] pub struct Entries<'a, T:'a> { front: uint, back: uint, @@ -508,17 +499,8 @@ pub struct Entries<'a, T:'a> { iterator!(impl Entries -> (uint, &'a T), get_ref) double_ended_iterator!(impl Entries -> (uint, &'a T), get_ref) -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct MutEntries<'a, T> { - front: uint, - back: uint, - iter: slice::MutItems<'a, Option<T>> -} - /// Forward iterator over the key-value pairs of a map, with the /// values being mutable. -#[cfg(not(stage0))] pub struct MutEntries<'a, T:'a> { front: uint, back: uint, diff --git a/src/libcollections/treemap.rs b/src/libcollections/treemap.rs index 7a131993c44..80a7c6d4bad 100644 --- a/src/libcollections/treemap.rs +++ b/src/libcollections/treemap.rs @@ -668,20 +668,7 @@ impl<K: Ord, V> TreeMap<K, V> { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Entries<'a, K, V> { - stack: Vec<&'a TreeNode<K, V>>, - // See the comment on MutEntries; this is just to allow - // code-sharing (for this immutable-values iterator it *could* very - // well be Option<&'a TreeNode<K,V>>). - node: *const TreeNode<K, V>, - remaining_min: uint, - remaining_max: uint -} - /// Lazy forward iterator over a map -#[cfg(not(stage0))] pub struct Entries<'a, K:'a, V:'a> { stack: Vec<&'a TreeNode<K, V>>, // See the comment on MutEntries; this is just to allow @@ -692,49 +679,13 @@ pub struct Entries<'a, K:'a, V:'a> { remaining_max: uint } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct RevEntries<'a, K, V> { - iter: Entries<'a, K, V>, -} - /// Lazy backward iterator over a map -#[cfg(not(stage0))] pub struct RevEntries<'a, K:'a, V:'a> { iter: Entries<'a, K, V>, } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct MutEntries<'a, K, V> { - stack: Vec<&'a mut TreeNode<K, V>>, - // Unfortunately, we require some unsafe-ness to get around the - // fact that we would be storing a reference *into* one of the - // nodes in the stack. - // - // As far as the compiler knows, this would let us invalidate the - // reference by assigning a new value to this node's position in - // its parent, which would cause this current one to be - // deallocated so this reference would be invalid. (i.e. the - // compilers complaints are 100% correct.) - // - // However, as far as you humans reading this code know (or are - // about to know, if you haven't read far enough down yet), we are - // only reading from the TreeNode.{left,right} fields. the only - // thing that is ever mutated is the .value field (although any - // actual mutation that happens is done externally, by the - // iterator consumer). So, don't be so concerned, rustc, we've got - // it under control. - // - // (This field can legitimately be null.) - node: *mut TreeNode<K, V>, - remaining_min: uint, - remaining_max: uint -} - /// Lazy forward iterator over a map that allows for the mutation of /// the values. -#[cfg(not(stage0))] pub struct MutEntries<'a, K:'a, V:'a> { stack: Vec<&'a mut TreeNode<K, V>>, // Unfortunately, we require some unsafe-ness to get around the @@ -761,14 +712,7 @@ pub struct MutEntries<'a, K:'a, V:'a> { remaining_max: uint } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct RevMutEntries<'a, K, V> { - iter: MutEntries<'a, K, V>, -} - /// Lazy backward iterator over a map -#[cfg(not(stage0))] pub struct RevMutEntries<'a, K:'a, V:'a> { iter: MutEntries<'a, K, V>, } @@ -1375,26 +1319,12 @@ impl<T: Ord> TreeSet<T> { } } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct SetItems<'a, T> { - iter: Entries<'a, T, ()> -} - /// A lazy forward iterator over a set. -#[cfg(not(stage0))] pub struct SetItems<'a, T:'a> { iter: Entries<'a, T, ()> } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct RevSetItems<'a, T> { - iter: RevEntries<'a, T, ()> -} - /// A lazy backward iterator over a set. -#[cfg(not(stage0))] pub struct RevSetItems<'a, T:'a> { iter: RevEntries<'a, T, ()> } @@ -1402,57 +1332,25 @@ pub struct RevSetItems<'a, T:'a> { /// A lazy forward iterator over a set that consumes the set while iterating. pub type MoveSetItems<T> = iter::Map<'static, (T, ()), T, MoveEntries<T, ()>>; -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct DifferenceItems<'a, T> { - a: Peekable<&'a T, SetItems<'a, T>>, - b: Peekable<&'a T, SetItems<'a, T>>, -} - /// A lazy iterator producing elements in the set difference (in-order). -#[cfg(not(stage0))] pub struct DifferenceItems<'a, T:'a> { a: Peekable<&'a T, SetItems<'a, T>>, b: Peekable<&'a T, SetItems<'a, T>>, } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct SymDifferenceItems<'a, T> { - a: Peekable<&'a T, SetItems<'a, T>>, - b: Peekable<&'a T, SetItems<'a, T>>, -} - /// A lazy iterator producing elements in the set symmetric difference (in-order). -#[cfg(not(stage0))] pub struct SymDifferenceItems<'a, T:'a> { a: Peekable<&'a T, SetItems<'a, T>>, b: Peekable<&'a T, SetItems<'a, T>>, } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct IntersectionItems<'a, T> { - a: Peekable<&'a T, SetItems<'a, T>>, - b: Peekable<&'a T, SetItems<'a, T>>, -} - /// A lazy iterator producing elements in the set intersection (in-order). -#[cfg(not(stage0))] pub struct IntersectionItems<'a, T:'a> { a: Peekable<&'a T, SetItems<'a, T>>, b: Peekable<&'a T, SetItems<'a, T>>, } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct UnionItems<'a, T> { - a: Peekable<&'a T, SetItems<'a, T>>, - b: Peekable<&'a T, SetItems<'a, T>>, -} - /// A lazy iterator producing elements in the set union (in-order). -#[cfg(not(stage0))] pub struct UnionItems<'a, T:'a> { a: Peekable<&'a T, SetItems<'a, T>>, b: Peekable<&'a T, SetItems<'a, T>>, diff --git a/src/libcollections/trie.rs b/src/libcollections/trie.rs index e79ec67cba0..fa8bcf94de1 100644 --- a/src/libcollections/trie.rs +++ b/src/libcollections/trie.rs @@ -857,17 +857,7 @@ fn remove<T>(count: &mut uint, child: &mut Child<T>, key: uint, return ret; } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct Entries<'a, T> { - stack: [slice::Items<'a, Child<T>>, .. NUM_CHUNKS], - length: uint, - remaining_min: uint, - remaining_max: uint -} - /// A forward iterator over a map. -#[cfg(not(stage0))] pub struct Entries<'a, T:'a> { stack: [slice::Items<'a, Child<T>>, .. NUM_CHUNKS], length: uint, @@ -875,18 +865,8 @@ pub struct Entries<'a, T:'a> { remaining_max: uint } -/// Note: stage0-specific version that lacks bound on A. -#[cfg(stage0)] -pub struct MutEntries<'a, T> { - stack: [slice::MutItems<'a, Child<T>>, .. NUM_CHUNKS], - length: uint, - remaining_min: uint, - remaining_max: uint -} - /// A forward iterator over the key-value pairs of a map, with the /// values being mutable. -#[cfg(not(stage0))] pub struct MutEntries<'a, T:'a> { stack: [slice::MutItems<'a, Child<T>>, .. NUM_CHUNKS], length: uint, |
