summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/panic-assoc-never-type.rs
blob: d2a840932a5d1270a1cdebc498ab8b737e5235d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// build-fail

// Regression test for #66975
#![feature(never_type)]

struct PrintName;

impl PrintName {
    const VOID: ! = panic!();
    //~^ ERROR evaluation of constant value failed
}

fn main() {
    let _ = PrintName::VOID;
    //~^ ERROR erroneous constant used [E0080]
}