]>
Commit | Line | Data |
---|---|---|
60c5eb7d XL |
1 | error[E0658]: `match` is not allowed in a `const` |
2 | --> $DIR/return-match-array-const.rs:2:17 | |
3 | | | |
4 | LL | [(); return match 0 { n => n }]; | |
5 | | ^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
8 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
9 | ||
10 | error[E0658]: `match` is not allowed in a `const` | |
11 | --> $DIR/return-match-array-const.rs:6:17 | |
12 | | | |
13 | LL | [(); return match 0 { 0 => 0 }]; | |
14 | | ^^^^^^^^^^^^^^^^^^ | |
15 | | | |
16 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
17 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
18 | ||
19 | error[E0658]: `match` is not allowed in a `const` | |
20 | --> $DIR/return-match-array-const.rs:10:17 | |
21 | | | |
22 | LL | [(); return match () { 'a' => 0, _ => 0 }]; | |
23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
24 | | | |
25 | = note: for more information, see https://github.com/rust-lang/rust/issues/49146 | |
26 | = help: add `#![feature(const_if_match)]` to the crate attributes to enable | |
27 | ||
8faf50e0 | 28 | error[E0572]: return statement outside of function body |
0731742a | 29 | --> $DIR/return-match-array-const.rs:2:10 |
8faf50e0 | 30 | | |
532ac7d7 | 31 | LL | [(); return match 0 { n => n }]; |
8faf50e0 XL |
32 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
33 | ||
34 | error[E0572]: return statement outside of function body | |
60c5eb7d | 35 | --> $DIR/return-match-array-const.rs:6:10 |
8faf50e0 | 36 | | |
532ac7d7 | 37 | LL | [(); return match 0 { 0 => 0 }]; |
8faf50e0 XL |
38 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
39 | ||
40 | error[E0572]: return statement outside of function body | |
60c5eb7d | 41 | --> $DIR/return-match-array-const.rs:10:10 |
8faf50e0 | 42 | | |
532ac7d7 | 43 | LL | [(); return match () { 'a' => 0, _ => 0 }]; |
8faf50e0 XL |
44 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
45 | ||
60c5eb7d | 46 | error: aborting due to 6 previous errors |
8faf50e0 | 47 | |
60c5eb7d XL |
48 | Some errors have detailed explanations: E0572, E0658. |
49 | For more information about an error, try `rustc --explain E0572`. |