1
Fork 0
rust/src/test/run-pass/inferred-suffix-in-pattern-range.rs

23 lines
477 B
Rust
Raw Normal View History

fn main() {
let x = 2;
let x_message = alt x {
2012-08-03 19:59:04 -07:00
0 to 1 => { ~"not many" }
_ => { ~"lots" }
};
assert x_message == ~"lots";
let y = 2i;
let y_message = alt y {
2012-08-03 19:59:04 -07:00
0 to 1 => { ~"not many" }
_ => { ~"lots" }
};
assert y_message == ~"lots";
let z = 1u64;
let z_message = alt z {
2012-08-03 19:59:04 -07:00
0 to 1 => { ~"not many" }
_ => { ~"lots" }
};
assert z_message == ~"not many";
}