Skip to content

Commit 5236a30

Browse files
committed
Fix check-fast.
1 parent 5b4d5ce commit 5236a30

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

src/test/run-pass/expr-alt-generic.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ fn test_bool() {
1515
}
1616

1717
type t = {a: int, b: int};
18-
impl t : cmp::Eq {
19-
pure fn eq(&&other: t) -> bool {
20-
self.a == other.a && self.b == other.b
21-
}
22-
}
2318

2419
fn test_rec() {
25-
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
20+
fn compare_rec(t1: t, t2: t) -> bool {
21+
t1.a == t2.a && t1.b == t2.b
22+
}
2623
test_generic::<t>({a: 1, b: 2}, compare_rec);
2724
}
2825

src/test/run-pass/expr-block-generic.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ fn test_bool() {
1717
}
1818

1919
type t = {a: int, b: int};
20-
impl t : cmp::Eq {
21-
pure fn eq(&&other: t) -> bool {
22-
self.a == other.a && self.b == other.b
23-
}
24-
}
2520

2621
fn test_rec() {
27-
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
22+
fn compare_rec(t1: t, t2: t) -> bool {
23+
t1.a == t2.a && t1.b == t2.b
24+
}
2825
test_generic::<t>({a: 1, b: 2}, compare_rec);
2926
}
3027

src/test/run-pass/expr-if-generic.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ fn test_bool() {
1717
}
1818

1919
type t = {a: int, b: int};
20-
impl t : cmp::Eq {
21-
pure fn eq(&&other: t) -> bool {
22-
self.a == other.a && self.b == other.b
23-
}
24-
}
2520

2621
fn test_rec() {
27-
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
22+
fn compare_rec(t1: t, t2: t) -> bool {
23+
t1.a == t2.a && t1.b == t2.b
24+
}
2825
test_generic::<t>({a: 1, b: 2}, {a: 2, b: 3}, compare_rec);
2926
}
3027

0 commit comments

Comments
 (0)