summaryrefslogtreecommitdiffstats
path: root/tests/ui/inline-const/pat-unsafe-err.rs
blob: e290b438c514093e59019355fdf299539974fff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// ignore-test This is currently broken
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck

#![allow(incomplete_features)]
#![feature(inline_const_pat)]

const unsafe fn require_unsafe() -> usize { 1 }

fn main() {
    match () {
        const {
            require_unsafe();
            //~^ ERROR [E0133]
        } => (),
    }
}