Skip to content

Commit c57400e

Browse files
committed
---
yaml --- r: 22153 b: refs/heads/snap-stage3 c: d9a06be h: refs/heads/master i: 22151: 16be2ee v: v3
1 parent e1e0bcd commit c57400e

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 70ae3e7bf212b0db5949e113858bae1da0e6ae29
4+
refs/heads/snap-stage3: d9a06be2249a539b17f629ea310c4a4c01a57197
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/core.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Implicitly, all crates behave as if they included the following prologue:
3939
#[legacy_modes];
4040
#[legacy_exports];
4141

42+
#[warn(deprecated_mode)];
43+
#[warn(deprecated_pattern)];
44+
4245
#[warn(vecs_implicitly_copyable)];
4346
#[deny(non_camel_case_types)];
4447

branches/snap-stage3/src/libcore/tuple.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,10 @@ impl<A: Copy, B: Copy> (~[A], ~[B]): ExtendedTupleOps<A,B> {
7878

7979
impl<A: Eq, B: Eq> (A, B) : Eq {
8080
pure fn eq(other: &(A, B)) -> bool {
81-
// XXX: This would be a lot less wordy with ref bindings, but I don't
82-
// trust that they work yet.
8381
match self {
84-
(self_a, self_b) => {
85-
match (*other) {
86-
(ref other_a, ref other_b) => {
87-
self_a.eq(other_a) && self_b.eq(other_b)
88-
}
82+
(ref self_a, ref self_b) => match other {
83+
&(ref other_a, ref other_b) => {
84+
(*self_a).eq(other_a) && (*self_b).eq(other_b)
8985
}
9086
}
9187
}
@@ -115,16 +111,11 @@ impl<A: Ord, B: Ord> (A, B) : Ord {
115111

116112
impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
117113
pure fn eq(other: &(A, B, C)) -> bool {
118-
// XXX: This would be a lot less wordy with ref bindings, but I don't
119-
// trust that they work yet.
120114
match self {
121-
(self_a, self_b, self_c) => {
122-
match (*other) {
123-
(ref other_a, ref other_b, ref other_c) => {
124-
self_a.eq(other_a) &&
125-
self_b.eq(other_b) &&
126-
self_c.eq(other_c)
127-
}
115+
(ref self_a, ref self_b, ref self_c) => match other {
116+
&(ref other_a, ref other_b, ref other_c) => {
117+
(*self_a).eq(other_a) && (*self_b).eq(other_b)
118+
&& (*self_c).eq(other_c)
128119
}
129120
}
130121
}

0 commit comments

Comments
 (0)