summary refs log tree commit diff
path: root/src/test/ui/consts/const-match-pattern-arm.rs
blob: 0482f7f7daeab9db9b0df82c46961b40f9f638d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![allow(warnings)]

const x: bool = match Some(true) { //~ ERROR `match` is not allowed in a `const`
    Some(value) => true,
    _ => false
};

const y: bool = {
    match Some(true) { //~ ERROR `match` is not allowed in a `const`
        Some(value) => true,
        _ => false
    }
};

fn main() {}