Skip to content

Commit

Permalink
Fix check-fast.
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Aug 31, 2012
1 parent 5b4d5ce commit 5236a30
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
9 changes: 3 additions & 6 deletions src/test/run-pass/expr-alt-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ fn test_bool() {
}

type t = {a: int, b: int};
impl t : cmp::Eq {
pure fn eq(&&other: t) -> bool {
self.a == other.a && self.b == other.b
}
}

fn test_rec() {
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
fn compare_rec(t1: t, t2: t) -> bool {
t1.a == t2.a && t1.b == t2.b
}
test_generic::<t>({a: 1, b: 2}, compare_rec);
}

Expand Down
9 changes: 3 additions & 6 deletions src/test/run-pass/expr-block-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ fn test_bool() {
}

type t = {a: int, b: int};
impl t : cmp::Eq {
pure fn eq(&&other: t) -> bool {
self.a == other.a && self.b == other.b
}
}

fn test_rec() {
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
fn compare_rec(t1: t, t2: t) -> bool {
t1.a == t2.a && t1.b == t2.b
}
test_generic::<t>({a: 1, b: 2}, compare_rec);
}

Expand Down
9 changes: 3 additions & 6 deletions src/test/run-pass/expr-if-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ fn test_bool() {
}

type t = {a: int, b: int};
impl t : cmp::Eq {
pure fn eq(&&other: t) -> bool {
self.a == other.a && self.b == other.b
}
}

fn test_rec() {
fn compare_rec(t1: t, t2: t) -> bool { return t1 == t2; }
fn compare_rec(t1: t, t2: t) -> bool {
t1.a == t2.a && t1.b == t2.b
}
test_generic::<t>({a: 1, b: 2}, {a: 2, b: 3}, compare_rec);
}

Expand Down

0 comments on commit 5236a30

Please sign in to comment.