Skip to content

Commit 9f5d7c5

Browse files
committed
---
yaml --- r: 150234 b: refs/heads/try2 c: da118e8 h: refs/heads/master v: v3
1 parent 41b89ed commit 9f5d7c5

Some content is hidden

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

54 files changed

+532
-415
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: bcaaffbe1e1c6a6a3abdabdb4fdaef36358dae33
8+
refs/heads/try2: da118e88d5f5814e5a7fad4dbeb8cc125054c5da
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#[feature(phase)];
1313

1414
#[allow(non_camel_case_types)];
15-
#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
1615
#[deny(warnings)];
1716

1817
extern crate test;

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
337337
}
338338
}
339339

340-
if tool_path.is_empty() {
340+
if tool_path.equals(&~"") {
341341
fatal(~"cannot found android cross path");
342342
}
343343

branches/try2/src/doc/rust.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3446,9 +3446,8 @@ The kinds are:
34463446
This kind includes scalars and immutable references,
34473447
as well as structural types containing other `Pod` types.
34483448
`'static`
3449-
: Types of this kind do not contain any references (except for
3450-
references with the `static` lifetime, which are allowed).
3451-
This can be a useful guarantee for code
3449+
: Types of this kind do not contain any references;
3450+
this can be a useful guarantee for code
34523451
that breaks borrowing assumptions
34533452
using [`unsafe` operations](#unsafe-functions).
34543453
`Drop`

branches/try2/src/driver/driver.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,4 @@ extern crate this = "rustdoc";
1414
#[cfg(rustc)]
1515
extern crate this = "rustc";
1616

17-
#[cfg(not(stage0))]
1817
fn main() { this::main() }
19-
20-
#[cfg(stage0)]
21-
#[start]
22-
fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, this::main) }

branches/try2/src/libcollections/btree.rs

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,16 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for BTree<K, V> {
9494

9595
impl<K: TotalOrd, V: TotalEq> Eq for BTree<K, V> {
9696
fn eq(&self, other: &BTree<K, V>) -> bool {
97-
self.root.cmp(&other.root) == Equal
97+
self.equals(other)
9898
}
9999
}
100100

101-
impl<K: TotalOrd, V: TotalEq> TotalEq for BTree<K, V> {}
101+
impl<K: TotalOrd, V: TotalEq> TotalEq for BTree<K, V> {
102+
///Testing equality on BTrees by comparing the root.
103+
fn equals(&self, other: &BTree<K, V>) -> bool {
104+
self.root.cmp(&other.root) == Equal
105+
}
106+
}
102107

103108
impl<K: TotalOrd, V: TotalEq> Ord for BTree<K, V> {
104109
fn lt(&self, other: &BTree<K, V>) -> bool {
@@ -199,6 +204,14 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Node<K, V> {
199204

200205
impl<K: TotalOrd, V: TotalEq> Eq for Node<K, V> {
201206
fn eq(&self, other: &Node<K, V>) -> bool {
207+
self.equals(other)
208+
}
209+
}
210+
211+
impl<K: TotalOrd, V: TotalEq> TotalEq for Node<K, V> {
212+
///Returns whether two nodes are equal based on the keys of each element.
213+
///Two nodes are equal if all of their keys are the same.
214+
fn equals(&self, other: &Node<K, V>) -> bool{
202215
match *self{
203216
BranchNode(ref branch) => {
204217
if other.is_leaf() {
@@ -219,8 +232,6 @@ impl<K: TotalOrd, V: TotalEq> Eq for Node<K, V> {
219232
}
220233
}
221234

222-
impl<K: TotalOrd, V: TotalEq> TotalEq for Node<K, V> {}
223-
224235
impl<K: TotalOrd, V: TotalEq> Ord for Node<K, V> {
225236
fn lt(&self, other: &Node<K, V>) -> bool {
226237
self.cmp(other) == Less
@@ -394,11 +405,16 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Leaf<K, V> {
394405

395406
impl<K: TotalOrd, V: TotalEq> Eq for Leaf<K, V> {
396407
fn eq(&self, other: &Leaf<K, V>) -> bool {
397-
self.elts == other.elts
408+
self.equals(other)
398409
}
399410
}
400411

401-
impl<K: TotalOrd, V: TotalEq> TotalEq for Leaf<K, V> {}
412+
impl<K: TotalOrd, V: TotalEq> TotalEq for Leaf<K, V> {
413+
///Implementation of equals function for leaves that compares LeafElts.
414+
fn equals(&self, other: &Leaf<K, V>) -> bool {
415+
self.elts.equals(&other.elts)
416+
}
417+
}
402418

403419
impl<K: TotalOrd, V: TotalEq> Ord for Leaf<K, V> {
404420
fn lt(&self, other: &Leaf<K, V>) -> bool {
@@ -623,11 +639,16 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for Branch<K, V> {
623639

624640
impl<K: TotalOrd, V: TotalEq> Eq for Branch<K, V> {
625641
fn eq(&self, other: &Branch<K, V>) -> bool {
626-
self.elts == other.elts
642+
self.equals(other)
627643
}
628644
}
629645

630-
impl<K: TotalOrd, V: TotalEq> TotalEq for Branch<K, V> {}
646+
impl<K: TotalOrd, V: TotalEq> TotalEq for Branch<K, V> {
647+
///Equals function for Branches--compares all the elements in each branch
648+
fn equals(&self, other: &Branch<K, V>) -> bool {
649+
self.elts.equals(&other.elts)
650+
}
651+
}
631652

632653
impl<K: TotalOrd, V: TotalEq> Ord for Branch<K, V> {
633654
fn lt(&self, other: &Branch<K, V>) -> bool {
@@ -691,11 +712,16 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for LeafElt<K, V> {
691712

692713
impl<K: TotalOrd, V: TotalEq> Eq for LeafElt<K, V> {
693714
fn eq(&self, other: &LeafElt<K, V>) -> bool {
694-
self.key == other.key && self.value == other.value
715+
self.equals(other)
695716
}
696717
}
697718

698-
impl<K: TotalOrd, V: TotalEq> TotalEq for LeafElt<K, V> {}
719+
impl<K: TotalOrd, V: TotalEq> TotalEq for LeafElt<K, V> {
720+
///TotalEq for LeafElts
721+
fn equals(&self, other: &LeafElt<K, V>) -> bool {
722+
self.key.equals(&other.key) && self.value.equals(&other.value)
723+
}
724+
}
699725

700726
impl<K: TotalOrd, V: TotalEq> Ord for LeafElt<K, V> {
701727
fn lt(&self, other: &LeafElt<K, V>) -> bool {
@@ -740,11 +766,16 @@ impl<K: Clone + TotalOrd, V: Clone> Clone for BranchElt<K, V> {
740766

741767
impl<K: TotalOrd, V: TotalEq> Eq for BranchElt<K, V>{
742768
fn eq(&self, other: &BranchElt<K, V>) -> bool {
743-
self.key == other.key && self.value == other.value
769+
self.equals(other)
744770
}
745771
}
746772

747-
impl<K: TotalOrd, V: TotalEq> TotalEq for BranchElt<K, V>{}
773+
impl<K: TotalOrd, V: TotalEq> TotalEq for BranchElt<K, V>{
774+
///TotalEq for BranchElts
775+
fn equals(&self, other: &BranchElt<K, V>) -> bool {
776+
self.key.equals(&other.key)&&self.value.equals(&other.value)
777+
}
778+
}
748779

749780
impl<K: TotalOrd, V: TotalEq> Ord for BranchElt<K, V> {
750781
fn lt(&self, other: &BranchElt<K, V>) -> bool {
@@ -869,7 +900,7 @@ mod test_btree {
869900
fn btree_clone_test() {
870901
let b = BTree::new(1, ~"abc", 2);
871902
let b2 = b.clone();
872-
assert!(b.root == b2.root)
903+
assert!(b.root.equals(&b2.root))
873904
}
874905
875906
//Tests the BTree's cmp() method when one node is "less than" another.

branches/try2/src/libgreen/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,6 @@ pub mod sleeper_list;
207207
pub mod stack;
208208
pub mod task;
209209

210-
#[lang = "start"]
211-
#[cfg(not(test), stage0)]
212-
pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int {
213-
use std::cast;
214-
start(argc, argv, proc() {
215-
let main: extern "Rust" fn() = unsafe { cast::transmute(main) };
216-
main();
217-
})
218-
}
219-
220210
/// Set up a default runtime configuration, given compiler-supplied arguments.
221211
///
222212
/// This function will block until the entire pool of M:N schedulers have

0 commit comments

Comments
 (0)