summaryrefslogtreecommitdiffstats
path: root/tests/ui/inline-const/required-const.rs
blob: 0483410662bfd1f58a323b6f03f6065eacb24333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// build-fail
// compile-flags: -Zmir-opt-level=3
#![feature(inline_const)]

fn foo<T>() {
    if false {
        const { panic!() } //~ ERROR E0080
    }
}

fn main() {
    foo::<i32>();
}