blob: e53c8463ef4bfdb7582005c817193c3488e663e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
fn main() {
match "wow" {
"bar" ..= "foo" => { }
};
//~^^ ERROR only `char` and numeric types are allowed in range
match "wow" {
10 ..= "what" => ()
};
//~^^ ERROR only `char` and numeric types are allowed in range
match "wow" {
true ..= "what" => {}
};
//~^^ ERROR only `char` and numeric types are allowed in range
match 5 {
'c' ..= 100 => { }
_ => { }
};
//~^^^ ERROR mismatched types
}
|