]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/match-range-fail.stderr
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / match / match-range-fail.stderr
1 error[E0029]: only `char` and numeric types are allowed in range patterns
2   --> $DIR/match-range-fail.rs:3:9
3    |
4 LL |         "bar" ..= "foo" => { }
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
9
10 error[E0029]: only `char` and numeric types are allowed in range patterns
11   --> $DIR/match-range-fail.rs:8:16
12    |
13 LL |         10 ..= "what" => ()
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
20    |
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
26
27 error[E0308]: mismatched types
28   --> $DIR/match-range-fail.rs:18:9
29    |
30 LL |     match 5 {
31    |           - this expression has type `{integer}`
32 LL |         'c' ..= 100 => { }
33    |         ^^^     --- this is of type `{integer}`
34    |         |
35    |         expected integer, found `char`
36
37 error: aborting due to 4 previous errors
38
39 Some errors have detailed explanations: E0029, E0308.
40 For more information about an error, try `rustc --explain E0029`.