1 error[E0572]: return statement outside of function body
2 --> $DIR/return-match-array-const.rs:5:10
8 LL | | [(); return match 0 { n => n }];
9 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ the return is part of this body...
13 | |_- ...not the enclosing function body
15 error[E0572]: return statement outside of function body
16 --> $DIR/return-match-array-const.rs:9:10
23 LL | | [(); return match 0 { 0 => 0 }];
24 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ the return is part of this body...
28 | |_- ...not the enclosing function body
30 error[E0572]: return statement outside of function body
31 --> $DIR/return-match-array-const.rs:13:10
38 LL | | [(); return match () { 'a' => 0, _ => 0 }];
39 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the return is part of this body...
43 | |_- ...not the enclosing function body
45 error[E0308]: mismatched types
46 --> $DIR/return-match-array-const.rs:13:28
48 LL | [(); return match () { 'a' => 0, _ => 0 }];
49 | -- ^^^ expected `()`, found `char`
51 | this expression has type `()`
53 error: aborting due to 4 previous errors
55 Some errors have detailed explanations: E0308, E0572.
56 For more information about an error, try `rustc --explain E0308`.