summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/unused-broken-const.rs
blob: 3b4523681002edb4eace6fec1d84103bff2b60d9 (plain)
1
2
3
4
5
6
7
8
9
// 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 any use of this value will cause an error
//~| WARN this was previously accepted by the compiler but is being phased out

fn main() {}