1 error[E0658]: `match` is not allowed in a `const`
2 --> $DIR/return-match-array-const.rs:2:17
4 LL | [(); return match 0 { n => n }];
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
10 error[E0658]: `match` is not allowed in a `const`
11 --> $DIR/return-match-array-const.rs:6:17
13 LL | [(); return match 0 { 0 => 0 }];
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
19 error[E0658]: `match` is not allowed in a `const`
20 --> $DIR/return-match-array-const.rs:10:17
22 LL | [(); return match () { 'a' => 0, _ => 0 }];
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
28 error[E0572]: return statement outside of function body
29 --> $DIR/return-match-array-const.rs:2:10
31 LL | [(); return match 0 { n => n }];
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^
34 error[E0572]: return statement outside of function body
35 --> $DIR/return-match-array-const.rs:6:10
37 LL | [(); return match 0 { 0 => 0 }];
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^
40 error[E0572]: return statement outside of function body
41 --> $DIR/return-match-array-const.rs:10:10
43 LL | [(); return match () { 'a' => 0, _ => 0 }];
44 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46 error: aborting due to 6 previous errors
48 Some errors have detailed explanations: E0572, E0658.
49 For more information about an error, try `rustc --explain E0572`.