rust/tests/ui/consts/const-eval/unused-broken-const.rs
2024-02-16 20:02:50 +00:00

9 lines
214 B
Rust

// 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() {}