Skip to content

Commit 138b1bb

Browse files
committed
---
yaml --- r: 56814 b: refs/heads/try c: a9741bd h: refs/heads/master v: v3
1 parent 25f2b69 commit 138b1bb

File tree

110 files changed

+1458
-2834
lines changed

Some content is hidden

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

110 files changed

+1458
-2834
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: c97c03cd6a5c4ac37f2e68226c9f8ec49c786fcf
5+
refs/heads/try: a9741bd33d7e55401f506bb82b99411d03ce7e3f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/tutorial.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ omitted.
495495

496496
A powerful application of pattern matching is *destructuring*:
497497
matching in order to bind names to the contents of data
498-
types. Assuming that `(float, float)` is a tuple of two floats:
498+
types.
499+
500+
> ***Note:*** The following code makes use of tuples (`(float, float)`) which
501+
> are explained in section 5.3. For now you can think of tuples as a list of
502+
> items.
499503
500504
~~~~
501505
fn angle(vector: (float, float)) -> float {

branches/try/src/libcore/cmp.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,6 @@ totalord_impl!(i64)
116116
totalord_impl!(int)
117117
totalord_impl!(uint)
118118

119-
pub fn cmp2<A:TotalOrd,B:TotalOrd>(
120-
a1: &A, b1: &B,
121-
a2: &A, b2: &B) -> Ordering
122-
{
123-
//! Compares (a1, b1) against (a2, b2), where the a values are more significant.
124-
125-
match a1.cmp(a2) {
126-
Less => Less,
127-
Greater => Greater,
128-
Equal => b1.cmp(b2)
129-
}
130-
}
131-
132119
/**
133120
* Trait for values that can be compared for a sort-order.
134121
*
@@ -206,14 +193,6 @@ mod test {
206193
assert_eq!(12.cmp(-5), Greater);
207194
}
208195

209-
#[test]
210-
fn test_cmp2() {
211-
assert_eq!(cmp2(1, 2, 3, 4), Less);
212-
assert_eq!(cmp2(3, 2, 3, 4), Less);
213-
assert_eq!(cmp2(5, 2, 3, 4), Greater);
214-
assert_eq!(cmp2(5, 5, 5, 4), Greater);
215-
}
216-
217196
#[test]
218197
fn test_int_totaleq() {
219198
assert!(5.equals(&5));

branches/try/src/libcore/condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct Condition<'self, T, U> {
2828
}
2929

3030
pub impl<'self, T, U> Condition<'self, T, U> {
31-
fn trap(&'self self, h: &'self fn(T) -> U) -> Trap<'self, T, U> {
31+
fn trap(&self, h: &'self fn(T) -> U) -> Trap<'self, T, U> {
3232
unsafe {
3333
let p : *RustClosure = ::cast::transmute(&h);
3434
let prev = task::local_data::local_data_get(self.key);

branches/try/src/libcore/container.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ pub trait Mutable: Container {
2525
fn clear(&mut self);
2626
}
2727

28-
#[cfg(stage0)]
2928
pub trait Map<K, V>: Mutable {
3029
/// Return true if the map contains a value for the specified key
3130
fn contains_key(&self, key: &K) -> bool;
@@ -58,41 +57,6 @@ pub trait Map<K, V>: Mutable {
5857
fn remove(&mut self, key: &K) -> bool;
5958
}
6059

61-
#[cfg(stage1)]
62-
#[cfg(stage2)]
63-
#[cfg(stage3)]
64-
pub trait Map<K, V>: Mutable {
65-
/// Return true if the map contains a value for the specified key
66-
fn contains_key(&self, key: &K) -> bool;
67-
68-
// Visits all keys and values
69-
fn each<'a>(&'a self, f: &fn(&K, &'a V) -> bool);
70-
71-
/// Visit all keys
72-
fn each_key(&self, f: &fn(&K) -> bool);
73-
74-
/// Visit all values
75-
fn each_value<'a>(&'a self, f: &fn(&'a V) -> bool);
76-
77-
/// Iterate over the map and mutate the contained values
78-
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool);
79-
80-
/// Return a reference to the value corresponding to the key
81-
fn find<'a>(&'a self, key: &K) -> Option<&'a V>;
82-
83-
/// Return a mutable reference to the value corresponding to the key
84-
fn find_mut<'a>(&'a mut self, key: &K) -> Option<&'a mut V>;
85-
86-
/// Insert a key-value pair into the map. An existing value for a
87-
/// key is replaced by the new value. Return true if the key did
88-
/// not already exist in the map.
89-
fn insert(&mut self, key: K, value: V) -> bool;
90-
91-
/// Remove a key-value pair from the map. Return true if the key
92-
/// was present in the map, otherwise false.
93-
fn remove(&mut self, key: &K) -> bool;
94-
}
95-
9660
pub trait Set<T>: Mutable {
9761
/// Return true if the set contains a value
9862
fn contains(&self, value: &T) -> bool;

0 commit comments

Comments
 (0)