summary refs log tree commit diff
path: root/src/test/ui/consts/control-flow/issue-50577.rs
blob: 9600f8b6aeeab8fda71d7cb3a21d2a922b164717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// revisions: stock if_match

#![cfg_attr(if_match, feature(const_if_match))]

fn main() {
    enum Foo {
        Drop = assert_eq!(1, 1)
        //[stock,if_match]~^ ERROR `if` may be missing an `else` clause
        //[stock]~^^ ERROR `match` is not allowed in a `const`
        //[stock]~| ERROR `match` is not allowed in a `const`
        //[stock]~| ERROR `if` is not allowed in a `const`
    }
}