summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/unused-broken-const.rs
blob: 0d2776bc2e3a6428bb9e41a566384427379e5996 (plain)
1
2
3
4
5
6
7
8
// make sure that an *unused* broken const triggers an error even in a check build

// compile-flags: --emit=dep-info,metadata

const FOO: i32 = [][0];
//~^ ERROR evaluation of constant value failed

fn main() {}