Files
rust/tests/ui/consts/const-assert-unchecked-ub.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
155 B
Rust
Raw Normal View History

2023-12-19 11:00:26 -08:00
const _: () = unsafe {
let n = u32::MAX.count_ones();
std::hint::assert_unchecked(n < 32); //~ ERROR `assume` called with `false`
2023-12-19 11:00:26 -08:00
};
fn main() {}