mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
also test div-by-minus-1
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#![feature(core_intrinsics)]
|
||||
fn main() {
|
||||
// MIN/-1 cannot be represented
|
||||
unsafe { std::intrinsics::unchecked_div(i16::min_value(), -1); } //~ ERROR Overflow executing `unchecked_div`
|
||||
}
|
||||
Reference in New Issue
Block a user