blob: 8b8e961b726d7ba5068f224d8efaf7c14c24ed41 [file] [log] [blame]
error[E0658]: `match` is not allowed in a `const`
--> $DIR/return-match-array-const.rs:2:17
|
LL | [(); return match 0 { n => n }];
| ^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/49146
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: `match` is not allowed in a `const`
--> $DIR/return-match-array-const.rs:6:17
|
LL | [(); return match 0 { 0 => 0 }];
| ^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/49146
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0658]: `match` is not allowed in a `const`
--> $DIR/return-match-array-const.rs:10:17
|
LL | [(); return match () { 'a' => 0, _ => 0 }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/49146
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
error[E0572]: return statement outside of function body
--> $DIR/return-match-array-const.rs:2:10
|
LL | [(); return match 0 { n => n }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0572]: return statement outside of function body
--> $DIR/return-match-array-const.rs:6:10
|
LL | [(); return match 0 { 0 => 0 }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0572]: return statement outside of function body
--> $DIR/return-match-array-const.rs:10:10
|
LL | [(); return match () { 'a' => 0, _ => 0 }];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0572, E0658.
For more information about an error, try `rustc --explain E0572`.