Skip to content

Commit ed26778

Browse files
committed
---
yaml --- r: 129782 b: refs/heads/auto c: 3a52ef4 h: refs/heads/master v: v3
1 parent 9367d09 commit ed26778

File tree

279 files changed

+3503
-7118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+3503
-7118
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1a33d7a54170cd2904cebc7a6fd2d1da471ff64e
16+
refs/heads/auto: 3a52ef4613f85fba1ecfd8746388bf34a5499bf9
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ DEPS_test := std getopts serialize rbml term time regex native:rust_test_helpers
9696
DEPS_time := std serialize
9797
DEPS_rand := core
9898
DEPS_url := std
99-
DEPS_log := std regex
99+
DEPS_log := std
100100
DEPS_regex := std
101101
DEPS_regex_macros = rustc syntax std regex
102102
DEPS_fmt_macros = std

branches/auto/src/liballoc/boxed.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ pub trait BoxAny {
105105
}
106106

107107
#[stable]
108-
impl BoxAny for Box<Any+'static> {
108+
impl BoxAny for Box<Any> {
109109
#[inline]
110-
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any+'static>> {
110+
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
111111
if self.is::<T>() {
112112
unsafe {
113113
// Get the raw representation of the trait object
@@ -132,7 +132,7 @@ impl<T: fmt::Show> fmt::Show for Box<T> {
132132
}
133133
}
134134

135-
impl fmt::Show for Box<Any+'static> {
135+
impl fmt::Show for Box<Any> {
136136
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
137137
f.pad("Box<Any>")
138138
}

branches/auto/src/libcollections/dlist.rs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,8 @@ struct Node<T> {
4949
value: T,
5050
}
5151

52-
/// Note: stage0-specific version that lacks bound on A.
53-
#[cfg(stage0)]
54-
pub struct Items<'a, T> {
55-
head: &'a Link<T>,
56-
tail: Rawlink<Node<T>>,
57-
nelem: uint,
58-
}
59-
6052
/// An iterator over references to the items of a `DList`.
61-
#[cfg(not(stage0))]
62-
pub struct Items<'a, T:'a> {
53+
pub struct Items<'a, T> {
6354
head: &'a Link<T>,
6455
tail: Rawlink<Node<T>>,
6556
nelem: uint,
@@ -70,25 +61,15 @@ impl<'a, T> Clone for Items<'a, T> {
7061
fn clone(&self) -> Items<'a, T> { *self }
7162
}
7263

73-
/// Note: stage0-specific version that lacks bound on A.
74-
#[cfg(stage0)]
75-
pub struct MutItems<'a, T> {
76-
list: &'a mut DList<T>,
77-
head: Rawlink<Node<T>>,
78-
tail: Rawlink<Node<T>>,
79-
nelem: uint,
80-
}
81-
8264
/// An iterator over mutable references to the items of a `DList`.
83-
#[cfg(not(stage0))]
84-
pub struct MutItems<'a, T:'a> {
65+
pub struct MutItems<'a, T> {
8566
list: &'a mut DList<T>,
8667
head: Rawlink<Node<T>>,
8768
tail: Rawlink<Node<T>>,
8869
nelem: uint,
8970
}
9071

91-
/// An iterator over mutable references to the items of a `DList`.
72+
/// A consuming iterator over the items of a `DList`.
9273
#[deriving(Clone)]
9374
pub struct MoveItems<T> {
9475
list: DList<T>

branches/auto/src/libcollections/priority_queue.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,8 @@ impl<T: Ord> PriorityQueue<T> {
515515
}
516516
}
517517

518-
/// Note: stage0-specific version that lacks bound on A.
519-
#[cfg(stage0)]
520-
pub struct Items <'a, T> {
521-
iter: slice::Items<'a, T>,
522-
}
523-
524518
/// `PriorityQueue` iterator.
525-
#[cfg(not(stage0))]
526-
pub struct Items <'a, T:'a> {
519+
pub struct Items <'a, T> {
527520
iter: slice::Items<'a, T>,
528521
}
529522

branches/auto/src/libcollections/ringbuf.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -293,18 +293,8 @@ impl<T> RingBuf<T> {
293293
}
294294
}
295295

296-
/// Note: stage0-specific version that lacks bound on A.
297-
#[cfg(stage0)]
298-
pub struct Items<'a, T> {
299-
lo: uint,
300-
index: uint,
301-
rindex: uint,
302-
elts: &'a [Option<T>],
303-
}
304-
305296
/// `RingBuf` iterator.
306-
#[cfg(not(stage0))]
307-
pub struct Items<'a, T:'a> {
297+
pub struct Items<'a, T> {
308298
lo: uint,
309299
index: uint,
310300
rindex: uint,
@@ -358,17 +348,8 @@ impl<'a, T> RandomAccessIterator<&'a T> for Items<'a, T> {
358348
}
359349
}
360350

361-
/// Note: stage0-specific version that lacks bound on A.
362-
#[cfg(stage0)]
363-
pub struct MutItems<'a, T> {
364-
remaining1: &'a mut [Option<T>],
365-
remaining2: &'a mut [Option<T>],
366-
nelts: uint,
367-
}
368-
369351
/// `RingBuf` mutable iterator.
370-
#[cfg(not(stage0))]
371-
pub struct MutItems<'a, T:'a> {
352+
pub struct MutItems<'a, T> {
372353
remaining1: &'a mut [Option<T>],
373354
remaining2: &'a mut [Option<T>],
374355
nelts: uint,

branches/auto/src/libcollections/smallintmap.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -489,17 +489,8 @@ macro_rules! double_ended_iterator {
489489
}
490490
}
491491

492-
/// Note: stage0-specific version that lacks bound on A.
493-
#[cfg(stage0)]
494-
pub struct Entries<'a, T> {
495-
front: uint,
496-
back: uint,
497-
iter: slice::Items<'a, Option<T>>
498-
}
499-
500492
/// Forward iterator over a map.
501-
#[cfg(not(stage0))]
502-
pub struct Entries<'a, T:'a> {
493+
pub struct Entries<'a, T> {
503494
front: uint,
504495
back: uint,
505496
iter: slice::Items<'a, Option<T>>
@@ -508,18 +499,9 @@ pub struct Entries<'a, T:'a> {
508499
iterator!(impl Entries -> (uint, &'a T), get_ref)
509500
double_ended_iterator!(impl Entries -> (uint, &'a T), get_ref)
510501

511-
/// Note: stage0-specific version that lacks bound on A.
512-
#[cfg(stage0)]
513-
pub struct MutEntries<'a, T> {
514-
front: uint,
515-
back: uint,
516-
iter: slice::MutItems<'a, Option<T>>
517-
}
518-
519502
/// Forward iterator over the key-value pairs of a map, with the
520503
/// values being mutable.
521-
#[cfg(not(stage0))]
522-
pub struct MutEntries<'a, T:'a> {
504+
pub struct MutEntries<'a, T> {
523505
front: uint,
524506
back: uint,
525507
iter: slice::MutItems<'a, Option<T>>

branches/auto/src/libcollections/treemap.rs

Lines changed: 16 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,7 @@ impl<K: Ord, V> TreeMap<K, V> {
668668
}
669669
}
670670

671-
/// Note: stage0-specific version that lacks bound on A.
672-
#[cfg(stage0)]
671+
/// A lazy forward iterator over a map.
673672
pub struct Entries<'a, K, V> {
674673
stack: Vec<&'a TreeNode<K, V>>,
675674
// See the comment on MutEntries; this is just to allow
@@ -680,62 +679,14 @@ pub struct Entries<'a, K, V> {
680679
remaining_max: uint
681680
}
682681

683-
/// Lazy forward iterator over a map
684-
#[cfg(not(stage0))]
685-
pub struct Entries<'a, K:'a, V:'a> {
686-
stack: Vec<&'a TreeNode<K, V>>,
687-
// See the comment on MutEntries; this is just to allow
688-
// code-sharing (for this immutable-values iterator it *could* very
689-
// well be Option<&'a TreeNode<K,V>>).
690-
node: *const TreeNode<K, V>,
691-
remaining_min: uint,
692-
remaining_max: uint
693-
}
694-
695-
/// Note: stage0-specific version that lacks bound on A.
696-
#[cfg(stage0)]
682+
/// Lazy backward iterator over a map.
697683
pub struct RevEntries<'a, K, V> {
698684
iter: Entries<'a, K, V>,
699685
}
700686

701-
/// Lazy backward iterator over a map
702-
#[cfg(not(stage0))]
703-
pub struct RevEntries<'a, K:'a, V:'a> {
704-
iter: Entries<'a, K, V>,
705-
}
706-
707-
/// Note: stage0-specific version that lacks bound on A.
708-
#[cfg(stage0)]
709-
pub struct MutEntries<'a, K, V> {
710-
stack: Vec<&'a mut TreeNode<K, V>>,
711-
// Unfortunately, we require some unsafe-ness to get around the
712-
// fact that we would be storing a reference *into* one of the
713-
// nodes in the stack.
714-
//
715-
// As far as the compiler knows, this would let us invalidate the
716-
// reference by assigning a new value to this node's position in
717-
// its parent, which would cause this current one to be
718-
// deallocated so this reference would be invalid. (i.e. the
719-
// compilers complaints are 100% correct.)
720-
//
721-
// However, as far as you humans reading this code know (or are
722-
// about to know, if you haven't read far enough down yet), we are
723-
// only reading from the TreeNode.{left,right} fields. the only
724-
// thing that is ever mutated is the .value field (although any
725-
// actual mutation that happens is done externally, by the
726-
// iterator consumer). So, don't be so concerned, rustc, we've got
727-
// it under control.
728-
//
729-
// (This field can legitimately be null.)
730-
node: *mut TreeNode<K, V>,
731-
remaining_min: uint,
732-
remaining_max: uint
733-
}
734-
735-
/// Lazy forward iterator over a map that allows for the mutation of
687+
/// A lazy forward iterator over a map that allows for the mutation of
736688
/// the values.
737-
#[cfg(not(stage0))]
738-
pub struct MutEntries<'a, K:'a, V:'a> {
689+
pub struct MutEntries<'a, K, V> {
739690
stack: Vec<&'a mut TreeNode<K, V>>,
740691
// Unfortunately, we require some unsafe-ness to get around the
741692
// fact that we would be storing a reference *into* one of the
@@ -761,17 +712,11 @@ pub struct MutEntries<'a, K:'a, V:'a> {
761712
remaining_max: uint
762713
}
763714

764-
/// Note: stage0-specific version that lacks bound on A.
765-
#[cfg(stage0)]
715+
/// Lazy backward iterator over a map.
766716
pub struct RevMutEntries<'a, K, V> {
767717
iter: MutEntries<'a, K, V>,
768718
}
769719

770-
/// Lazy backward iterator over a map
771-
#[cfg(not(stage0))]
772-
pub struct RevMutEntries<'a, K:'a, V:'a> {
773-
iter: MutEntries<'a, K, V>,
774-
}
775720

776721
/// TreeMap keys iterator.
777722
pub type Keys<'a, K, V> =
@@ -940,7 +885,9 @@ fn mut_deref<K, V>(x: &mut Option<Box<TreeNode<K, V>>>)
940885
}
941886
}
942887

943-
/// Lazy forward iterator over a map that consumes the map while iterating
888+
889+
890+
/// A lazy forward iterator over a map that consumes the map while iterating.
944891
pub struct MoveEntries<K, V> {
945892
stack: Vec<TreeNode<K, V>>,
946893
remaining: uint
@@ -1375,90 +1322,45 @@ impl<T: Ord> TreeSet<T> {
13751322
}
13761323
}
13771324

1378-
/// Note: stage0-specific version that lacks bound on A.
1379-
#[cfg(stage0)]
1380-
pub struct SetItems<'a, T> {
1381-
iter: Entries<'a, T, ()>
1382-
}
1383-
13841325
/// A lazy forward iterator over a set.
1385-
#[cfg(not(stage0))]
1386-
pub struct SetItems<'a, T:'a> {
1326+
pub struct SetItems<'a, T> {
13871327
iter: Entries<'a, T, ()>
13881328
}
13891329

1390-
/// Note: stage0-specific version that lacks bound on A.
1391-
#[cfg(stage0)]
1330+
/// Lazy backward iterator over a set.
13921331
pub struct RevSetItems<'a, T> {
13931332
iter: RevEntries<'a, T, ()>
13941333
}
13951334

1396-
/// A lazy backward iterator over a set.
1397-
#[cfg(not(stage0))]
1398-
pub struct RevSetItems<'a, T:'a> {
1399-
iter: RevEntries<'a, T, ()>
1400-
}
1401-
14021335
/// A lazy forward iterator over a set that consumes the set while iterating.
14031336
pub type MoveSetItems<T> = iter::Map<'static, (T, ()), T, MoveEntries<T, ()>>;
14041337

1405-
/// Note: stage0-specific version that lacks bound on A.
1406-
#[cfg(stage0)]
1407-
pub struct DifferenceItems<'a, T> {
1408-
a: Peekable<&'a T, SetItems<'a, T>>,
1409-
b: Peekable<&'a T, SetItems<'a, T>>,
1410-
}
1411-
14121338
/// A lazy iterator producing elements in the set difference (in-order).
1413-
#[cfg(not(stage0))]
1414-
pub struct DifferenceItems<'a, T:'a> {
1415-
a: Peekable<&'a T, SetItems<'a, T>>,
1416-
b: Peekable<&'a T, SetItems<'a, T>>,
1417-
}
1418-
1419-
/// Note: stage0-specific version that lacks bound on A.
1420-
#[cfg(stage0)]
1421-
pub struct SymDifferenceItems<'a, T> {
1339+
pub struct DifferenceItems<'a, T> {
14221340
a: Peekable<&'a T, SetItems<'a, T>>,
14231341
b: Peekable<&'a T, SetItems<'a, T>>,
14241342
}
14251343

14261344
/// A lazy iterator producing elements in the set symmetric difference (in-order).
1427-
#[cfg(not(stage0))]
1428-
pub struct SymDifferenceItems<'a, T:'a> {
1429-
a: Peekable<&'a T, SetItems<'a, T>>,
1430-
b: Peekable<&'a T, SetItems<'a, T>>,
1431-
}
1432-
1433-
/// Note: stage0-specific version that lacks bound on A.
1434-
#[cfg(stage0)]
1435-
pub struct IntersectionItems<'a, T> {
1345+
pub struct SymDifferenceItems<'a, T> {
14361346
a: Peekable<&'a T, SetItems<'a, T>>,
14371347
b: Peekable<&'a T, SetItems<'a, T>>,
14381348
}
14391349

14401350
/// A lazy iterator producing elements in the set intersection (in-order).
1441-
#[cfg(not(stage0))]
1442-
pub struct IntersectionItems<'a, T:'a> {
1443-
a: Peekable<&'a T, SetItems<'a, T>>,
1444-
b: Peekable<&'a T, SetItems<'a, T>>,
1445-
}
1446-
1447-
/// Note: stage0-specific version that lacks bound on A.
1448-
#[cfg(stage0)]
1449-
pub struct UnionItems<'a, T> {
1351+
pub struct IntersectionItems<'a, T> {
14501352
a: Peekable<&'a T, SetItems<'a, T>>,
14511353
b: Peekable<&'a T, SetItems<'a, T>>,
14521354
}
14531355

14541356
/// A lazy iterator producing elements in the set union (in-order).
1455-
#[cfg(not(stage0))]
1456-
pub struct UnionItems<'a, T:'a> {
1357+
pub struct UnionItems<'a, T> {
14571358
a: Peekable<&'a T, SetItems<'a, T>>,
14581359
b: Peekable<&'a T, SetItems<'a, T>>,
14591360
}
14601361

1461-
/// Compare `x` and `y`, but return `short` if x is None and `long` if y is None
1362+
/// Compare `x` and `y`, but return `short` if x is None and `long` if y is
1363+
/// `None`.
14621364
fn cmp_opt<T: Ord>(x: Option<&T>, y: Option<&T>,
14631365
short: Ordering, long: Ordering) -> Ordering {
14641366
match (x, y) {

0 commit comments

Comments
 (0)