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