rust/src/test/compile-fail/alt-range-fail.rs

20 lines
289 B
Rust
Raw Normal View History

//error-pattern: lower range bound
//error-pattern: non-numeric
//error-pattern: mismatched types
fn main() {
2012-08-06 14:34:08 -05:00
match 5u {
2012-08-03 21:59:04 -05:00
6u to 1u => { }
_ => { }
};
2012-08-06 14:34:08 -05:00
match "wow" {
2012-08-03 21:59:04 -05:00
"bar" to "foo" => { }
};
2012-08-06 14:34:08 -05:00
match 5u {
2012-08-03 21:59:04 -05:00
'c' to 100u => { }
_ => { }
};
}