rust/tests/fail/intrinsics/div-by-zero.rs

10 lines
155 B
Rust
Raw Normal View History

#![feature(core_intrinsics)]
use std::intrinsics::*;
fn main() {
unsafe {
2020-02-06 04:20:28 -06:00
let _n = unchecked_div(1i64, 0); //~ERROR dividing by zero
}
}