2011-09-28 19:07:33 +00:00
|
|
|
fn main() {
|
2015-05-24 04:29:12 +00:00
|
|
|
match "wow" {
|
2018-05-29 02:42:11 +00:00
|
|
|
"bar" ..= "foo" => { }
|
2011-09-28 19:07:33 +00:00
|
|
|
};
|
2020-09-15 19:34:58 +00:00
|
|
|
//~^^ ERROR only `char` and numeric types are allowed in range
|
2011-09-28 19:07:33 +00:00
|
|
|
|
2012-08-06 19:34:08 +00:00
|
|
|
match "wow" {
|
2018-05-29 02:42:11 +00:00
|
|
|
10 ..= "what" => ()
|
2011-09-28 19:07:33 +00:00
|
|
|
};
|
2020-09-15 19:34:58 +00:00
|
|
|
//~^^ ERROR only `char` and numeric types are allowed in range
|
2019-11-12 23:27:53 +00:00
|
|
|
|
|
|
|
match "wow" {
|
|
|
|
true ..= "what" => {}
|
|
|
|
};
|
2020-09-15 19:34:58 +00:00
|
|
|
//~^^ ERROR only `char` and numeric types are allowed in range
|
2011-09-28 19:07:33 +00:00
|
|
|
|
2015-02-17 14:47:49 +00:00
|
|
|
match 5 {
|
2018-05-29 02:42:11 +00:00
|
|
|
'c' ..= 100 => { }
|
2015-05-24 04:29:12 +00:00
|
|
|
_ => { }
|
2011-09-28 19:07:33 +00:00
|
|
|
};
|
2016-07-16 16:38:17 +00:00
|
|
|
//~^^^ ERROR mismatched types
|
2012-07-14 20:55:41 +00:00
|
|
|
}
|