Files
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 12:34:08 -07:00
match 5u {
2012-09-01 18:38:05 -07:00
6u .. 1u => { }
2012-08-03 19:59:04 -07:00
_ => { }
};
2012-08-06 12:34:08 -07:00
match "wow" {
2012-09-01 18:38:05 -07:00
"bar" .. "foo" => { }
};
2012-08-06 12:34:08 -07:00
match 5u {
2012-09-01 18:38:05 -07:00
'c' .. 100u => { }
2012-08-03 19:59:04 -07:00
_ => { }
};
}