rust/tests/ui/consts/const-eval/unused-broken-const.rs

9 lines
213 B
Rust
Raw Normal View History

// 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];
2022-09-21 06:05:20 -05:00
//~^ ERROR evaluation of constant value failed
fn main() {}