]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-match-pattern-arm.rs
Rollup merge of #72279 - RalfJung:raw-ref-macros, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-match-pattern-arm.rs
1 #![allow(warnings)]
2
3 const x: bool = match Some(true) { //~ ERROR `match` is not allowed in a `const`
4     Some(value) => true,
5     _ => false
6 };
7
8 const y: bool = {
9     match Some(true) { //~ ERROR `match` is not allowed in a `const`
10         Some(value) => true,
11         _ => false
12     }
13 };
14
15 fn main() {}