blob: c66fd3729a71fc16956ed93e447dc9ba127628c0 [file]
//@ run-crash
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
//@ error-pattern: unsafe precondition(s) violated: u8::unchecked_shr cannot overflow
fn main() {
unsafe {
0u8.unchecked_shr(u8::BITS);
}
}