about summary refs log tree commit diff
path: root/tests/ui/inline-const/required-const.rs
blob: 3de0ab2a0c06c6a05fc2aac6a77a9aa24cabf0fa (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>();
}