]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/match-range-fail.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / match / match-range-fail.rs
1 fn main() {
2     match "wow" {
3         "bar" ..= "foo" => { }
4     };
5     //~^^ ERROR only `char` and numeric types are allowed in range
6
7     match "wow" {
8         10 ..= "what" => ()
9     };
10     //~^^ ERROR only `char` and numeric types are allowed in range
11
12     match "wow" {
13         true ..= "what" => {}
14     };
15     //~^^ ERROR only `char` and numeric types are allowed in range
16
17     match 5 {
18         'c' ..= 100 => { }
19         _ => { }
20     };
21     //~^^^ ERROR mismatched types
22 }