]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0029]: only char and numeric types are allowed in range patterns |
0731742a | 2 | --> $DIR/match-range-fail.rs:3:9 |
b7449926 XL |
3 | | |
4 | LL | "bar" ..= "foo" => { } | |
60c5eb7d XL |
5 | | -----^^^^^----- |
6 | | | | | |
7 | | | this is of type `&'static str` but it should be `char` or numeric | |
8 | | this is of type `&'static str` but it should be `char` or numeric | |
b7449926 XL |
9 | |
10 | error[E0029]: only char and numeric types are allowed in range patterns | |
60c5eb7d | 11 | --> $DIR/match-range-fail.rs:8:16 |
b7449926 XL |
12 | | |
13 | LL | 10 ..= "what" => () | |
60c5eb7d XL |
14 | | -- ^^^^^^ this is of type `&'static str` but it should be `char` or numeric |
15 | | | | |
16 | | this is of type `{integer}` | |
17 | ||
18 | error[E0029]: only char and numeric types are allowed in range patterns | |
19 | --> $DIR/match-range-fail.rs:13:9 | |
b7449926 | 20 | | |
60c5eb7d XL |
21 | LL | true ..= "what" => {} |
22 | | ----^^^^^------ | |
23 | | | | | |
24 | | | this is of type `&'static str` but it should be `char` or numeric | |
25 | | this is of type `bool` but it should be `char` or numeric | |
b7449926 XL |
26 | |
27 | error[E0308]: mismatched types | |
60c5eb7d | 28 | --> $DIR/match-range-fail.rs:18:9 |
b7449926 XL |
29 | | |
30 | LL | 'c' ..= 100 => { } | |
60c5eb7d | 31 | | ^^^^^^^^^^^ expected integer, found `char` |
b7449926 | 32 | |
60c5eb7d | 33 | error: aborting due to 4 previous errors |
b7449926 | 34 | |
48663c56 | 35 | Some errors have detailed explanations: E0029, E0308. |
b7449926 | 36 | For more information about an error, try `rustc --explain E0029`. |