Skip to content

Commit 3478604

Browse files
committed
---
yaml --- r: 190971 b: refs/heads/auto c: fad4c38 h: refs/heads/master i: 190969: 7dcb84d 190967: d7ec9a8 v: v3
1 parent 2a7c02f commit 3478604

File tree

209 files changed

+18549
-11497
lines changed

Some content is hidden

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

209 files changed

+18549
-11497
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: f5765793b650e45e8c9bc89dfc7a4dc628123cb7
13+
refs/heads/auto: fad4c380e8da106baca0c6259306be6e3574d4ba
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,10 @@ case $CFG_CPUTYPE in
461461
CFG_CPUTYPE=aarch64
462462
;;
463463

464-
powerpc)
464+
# At some point, when ppc64[le] support happens, this will need to do
465+
# something clever. For now it's safe to assume that we're only ever
466+
# interested in building 32 bit.
467+
powerpc | ppc | ppc64)
465468
CFG_CPUTYPE=powerpc
466469
;;
467470

branches/auto/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ PKG_FILES := \
5353
driver \
5454
etc \
5555
$(foreach crate,$(CRATES),lib$(crate)) \
56+
libcollectionstest \
5657
libcoretest \
5758
libbacktrace \
5859
rt \

branches/auto/mk/target.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
7272
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7373
$$(CRATEFILE_$(4)) \
7474
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
75+
$$(LLVM_CONFIG_$(2)) \
7576
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7677
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7778
@$$(call E, rustc: $$(@D)/lib$(4))

branches/auto/mk/tests.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

22-
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
22+
DEPS_collectionstest :=
23+
$(eval $(call RUST_CRATE,collectionstest))
24+
25+
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) collectionstest coretest
2326
TEST_DOC_CRATES = $(DOC_CRATES)
2427
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans rustc_lint,\
2528
$(HOST_CRATES))

branches/auto/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(core)]
23-
#![feature(net)]
2423
#![feature(path_ext)]
2524

2625
#![deny(warnings)]

branches/auto/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ right at home if you've used tools like [Bundler](http://bundler.io/),
140140
[npm](https://www.npmjs.org/), or [pip](https://pip.pypa.io/en/latest/).
141141
There's no `Makefile`s or endless `autotools` output here. (Rust's tooling does
142142
[play nice with external libraries written in those
143-
tools](http://crates.io/native-build.html), if you need to.)
143+
tools](http://doc.crates.io/build-script.html), if you need to.)
144144

145145
Enough about tools, let's talk code!
146146

branches/auto/src/doc/reference.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,16 +1961,18 @@ module through the rules above. It essentially allows public access into the
19611961
re-exported item. For example, this program is valid:
19621962

19631963
```
1964-
pub use self::implementation as api;
1964+
pub use self::implementation::api;
19651965
19661966
mod implementation {
1967-
pub fn f() {}
1967+
pub mod api {
1968+
pub fn f() {}
1969+
}
19681970
}
19691971
19701972
# fn main() {}
19711973
```
19721974

1973-
This means that any external crate referencing `implementation::f` would
1975+
This means that any external crate referencing `implementation::api::f` would
19741976
receive a privacy violation, while the path `api::f` would be allowed.
19751977

19761978
When re-exporting a private item, it can be thought of as allowing the "privacy

branches/auto/src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ use heap::deallocate;
9494
/// With simple pipes, without `Arc`, a copy would have to be made for each
9595
/// task.
9696
///
97-
/// ```rust
97+
/// ```
9898
/// use std::sync::Arc;
9999
/// use std::thread;
100100
///

branches/auto/src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use core::raw::TraitObject;
6464
///
6565
/// The following two examples are equivalent:
6666
///
67-
/// ```rust
67+
/// ```
6868
/// #![feature(box_syntax)]
6969
/// use std::boxed::HEAP;
7070
///

branches/auto/src/liballoc/heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#[cfg(stage0)]
1112
#[cfg(not(test))]
1213
use core::ptr::PtrExt;
1314

@@ -387,7 +388,6 @@ mod imp {
387388
mod test {
388389
extern crate test;
389390
use self::test::Bencher;
390-
use core::ptr::PtrExt;
391391
use boxed::Box;
392392
use heap;
393393

branches/auto/src/liballoc/rc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ use core::nonzero::NonZero;
159159
use core::ops::{Deref, Drop};
160160
use core::option::Option;
161161
use core::option::Option::{Some, None};
162+
#[cfg(stage0)]
162163
use core::ptr::{self, PtrExt};
164+
#[cfg(not(stage0))]
165+
use core::ptr;
163166
use core::result::Result;
164167
use core::result::Result::{Ok, Err};
165168
use core::intrinsics::assume;

branches/auto/src/libarena/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use std::intrinsics::{TyDesc, get_tydesc};
4646
use std::intrinsics;
4747
use std::marker;
4848
use std::mem;
49+
#[cfg(stage0)]
4950
use std::num::{Int, UnsignedInt};
5051
use std::ptr;
5152
use std::rc::Rc;

branches/auto/src/libcollections/binary_heap.rs

Lines changed: 5 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ use vec::{self, Vec};
163163
/// A priority queue implemented with a binary heap.
164164
///
165165
/// This will be a max-heap.
166+
///
167+
/// It is a logic error for an item to be modified in such a way that the
168+
/// item's ordering relative to any other item, as determined by the `Ord`
169+
/// trait, changes while it is in the heap. This is normally only possible
170+
/// through `Cell`, `RefCell`, global state, I/O, or unsafe code.
166171
#[derive(Clone)]
167172
#[stable(feature = "rust1", since = "1.0.0")]
168173
pub struct BinaryHeap<T> {
@@ -688,218 +693,3 @@ impl<T: Ord> Extend<T> for BinaryHeap<T> {
688693
}
689694
}
690695
}
691-
692-
#[cfg(test)]
693-
mod tests {
694-
use prelude::*;
695-
696-
use super::BinaryHeap;
697-
698-
#[test]
699-
fn test_iterator() {
700-
let data = vec![5, 9, 3];
701-
let iterout = [9, 5, 3];
702-
let heap = BinaryHeap::from_vec(data);
703-
let mut i = 0;
704-
for el in &heap {
705-
assert_eq!(*el, iterout[i]);
706-
i += 1;
707-
}
708-
}
709-
710-
#[test]
711-
fn test_iterator_reverse() {
712-
let data = vec![5, 9, 3];
713-
let iterout = vec![3, 5, 9];
714-
let pq = BinaryHeap::from_vec(data);
715-
716-
let v: Vec<_> = pq.iter().rev().cloned().collect();
717-
assert_eq!(v, iterout);
718-
}
719-
720-
#[test]
721-
fn test_move_iter() {
722-
let data = vec![5, 9, 3];
723-
let iterout = vec![9, 5, 3];
724-
let pq = BinaryHeap::from_vec(data);
725-
726-
let v: Vec<_> = pq.into_iter().collect();
727-
assert_eq!(v, iterout);
728-
}
729-
730-
#[test]
731-
fn test_move_iter_size_hint() {
732-
let data = vec![5, 9];
733-
let pq = BinaryHeap::from_vec(data);
734-
735-
let mut it = pq.into_iter();
736-
737-
assert_eq!(it.size_hint(), (2, Some(2)));
738-
assert_eq!(it.next(), Some(9));
739-
740-
assert_eq!(it.size_hint(), (1, Some(1)));
741-
assert_eq!(it.next(), Some(5));
742-
743-
assert_eq!(it.size_hint(), (0, Some(0)));
744-
assert_eq!(it.next(), None);
745-
}
746-
747-
#[test]
748-
fn test_move_iter_reverse() {
749-
let data = vec![5, 9, 3];
750-
let iterout = vec![3, 5, 9];
751-
let pq = BinaryHeap::from_vec(data);
752-
753-
let v: Vec<_> = pq.into_iter().rev().collect();
754-
assert_eq!(v, iterout);
755-
}
756-
757-
#[test]
758-
fn test_peek_and_pop() {
759-
let data = vec![2, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1];
760-
let mut sorted = data.clone();
761-
sorted.sort();
762-
let mut heap = BinaryHeap::from_vec(data);
763-
while !heap.is_empty() {
764-
assert_eq!(heap.peek().unwrap(), sorted.last().unwrap());
765-
assert_eq!(heap.pop().unwrap(), sorted.pop().unwrap());
766-
}
767-
}
768-
769-
#[test]
770-
fn test_push() {
771-
let mut heap = BinaryHeap::from_vec(vec![2, 4, 9]);
772-
assert_eq!(heap.len(), 3);
773-
assert!(*heap.peek().unwrap() == 9);
774-
heap.push(11);
775-
assert_eq!(heap.len(), 4);
776-
assert!(*heap.peek().unwrap() == 11);
777-
heap.push(5);
778-
assert_eq!(heap.len(), 5);
779-
assert!(*heap.peek().unwrap() == 11);
780-
heap.push(27);
781-
assert_eq!(heap.len(), 6);
782-
assert!(*heap.peek().unwrap() == 27);
783-
heap.push(3);
784-
assert_eq!(heap.len(), 7);
785-
assert!(*heap.peek().unwrap() == 27);
786-
heap.push(103);
787-
assert_eq!(heap.len(), 8);
788-
assert!(*heap.peek().unwrap() == 103);
789-
}
790-
791-
#[test]
792-
fn test_push_unique() {
793-
let mut heap = BinaryHeap::<Box<_>>::from_vec(vec![box 2, box 4, box 9]);
794-
assert_eq!(heap.len(), 3);
795-
assert!(*heap.peek().unwrap() == box 9);
796-
heap.push(box 11);
797-
assert_eq!(heap.len(), 4);
798-
assert!(*heap.peek().unwrap() == box 11);
799-
heap.push(box 5);
800-
assert_eq!(heap.len(), 5);
801-
assert!(*heap.peek().unwrap() == box 11);
802-
heap.push(box 27);
803-
assert_eq!(heap.len(), 6);
804-
assert!(*heap.peek().unwrap() == box 27);
805-
heap.push(box 3);
806-
assert_eq!(heap.len(), 7);
807-
assert!(*heap.peek().unwrap() == box 27);
808-
heap.push(box 103);
809-
assert_eq!(heap.len(), 8);
810-
assert!(*heap.peek().unwrap() == box 103);
811-
}
812-
813-
#[test]
814-
fn test_push_pop() {
815-
let mut heap = BinaryHeap::from_vec(vec![5, 5, 2, 1, 3]);
816-
assert_eq!(heap.len(), 5);
817-
assert_eq!(heap.push_pop(6), 6);
818-
assert_eq!(heap.len(), 5);
819-
assert_eq!(heap.push_pop(0), 5);
820-
assert_eq!(heap.len(), 5);
821-
assert_eq!(heap.push_pop(4), 5);
822-
assert_eq!(heap.len(), 5);
823-
assert_eq!(heap.push_pop(1), 4);
824-
assert_eq!(heap.len(), 5);
825-
}
826-
827-
#[test]
828-
fn test_replace() {
829-
let mut heap = BinaryHeap::from_vec(vec![5, 5, 2, 1, 3]);
830-
assert_eq!(heap.len(), 5);
831-
assert_eq!(heap.replace(6).unwrap(), 5);
832-
assert_eq!(heap.len(), 5);
833-
assert_eq!(heap.replace(0).unwrap(), 6);
834-
assert_eq!(heap.len(), 5);
835-
assert_eq!(heap.replace(4).unwrap(), 5);
836-
assert_eq!(heap.len(), 5);
837-
assert_eq!(heap.replace(1).unwrap(), 4);
838-
assert_eq!(heap.len(), 5);
839-
}
840-
841-
fn check_to_vec(mut data: Vec<i32>) {
842-
let heap = BinaryHeap::from_vec(data.clone());
843-
let mut v = heap.clone().into_vec();
844-
v.sort();
845-
data.sort();
846-
847-
assert_eq!(v, data);
848-
assert_eq!(heap.into_sorted_vec(), data);
849-
}
850-
851-
#[test]
852-
fn test_to_vec() {
853-
check_to_vec(vec![]);
854-
check_to_vec(vec![5]);
855-
check_to_vec(vec![3, 2]);
856-
check_to_vec(vec![2, 3]);
857-
check_to_vec(vec![5, 1, 2]);
858-
check_to_vec(vec![1, 100, 2, 3]);
859-
check_to_vec(vec![1, 3, 5, 7, 9, 2, 4, 6, 8, 0]);
860-
check_to_vec(vec![2, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1]);
861-
check_to_vec(vec![9, 11, 9, 9, 9, 9, 11, 2, 3, 4, 11, 9, 0, 0, 0, 0]);
862-
check_to_vec(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
863-
check_to_vec(vec![10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]);
864-
check_to_vec(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 1, 2]);
865-
check_to_vec(vec![5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]);
866-
}
867-
868-
#[test]
869-
fn test_empty_pop() {
870-
let mut heap = BinaryHeap::<i32>::new();
871-
assert!(heap.pop().is_none());
872-
}
873-
874-
#[test]
875-
fn test_empty_peek() {
876-
let empty = BinaryHeap::<i32>::new();
877-
assert!(empty.peek().is_none());
878-
}
879-
880-
#[test]
881-
fn test_empty_replace() {
882-
let mut heap = BinaryHeap::new();
883-
assert!(heap.replace(5).is_none());
884-
}
885-
886-
#[test]
887-
fn test_from_iter() {
888-
let xs = vec![9, 8, 7, 6, 5, 4, 3, 2, 1];
889-
890-
let mut q: BinaryHeap<_> = xs.iter().rev().cloned().collect();
891-
892-
for &x in &xs {
893-
assert_eq!(q.pop().unwrap(), x);
894-
}
895-
}
896-
897-
#[test]
898-
fn test_drain() {
899-
let mut q: BinaryHeap<_> = [9, 8, 7, 6, 5, 4, 3, 2, 1].iter().cloned().collect();
900-
901-
assert_eq!(q.drain().take(5).count(), 5);
902-
903-
assert!(q.is_empty());
904-
}
905-
}

0 commit comments

Comments
 (0)