Fix parse error in constrained-type-missing-check.rs

This commit is contained in:
Matt Brubeck 2011-10-16 18:27:33 -07:00 committed by Brian Anderson
parent f70a894855
commit 15d33f7957
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
pure fn less_than(x: int, y: int) -> bool { ret x < y; }
type ordered_range = {low: int, high: int} : less_than(low, high);
type ordered_range = {low: int, high: int} : less_than(*.low, *.high);
fn main() {
// Should fail to compile, b/c we're not doing the check
@ -13,4 +13,4 @@ fn main() {
let b: int = 2;
let c: ordered_range = {low: a, high: b};
log c.low;
}
}