Sign in
rust
/
rust
/
97b1c314892ef4497c0ce5656daa3a54c4e052d3
/
.
/
tests
/
ui
/
precondition-checks
/
unchecked_shr.rs
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
);
}
}