rust/tests/compile-fail/div-by-zero-1.rs

12 lines
178 B
Rust
Raw Normal View History

#![feature(core_intrinsics)]
use std::intrinsics::*;
//error-pattern: Division by 0 in unchecked_div
fn main() {
unsafe {
let _n = unchecked_div(1i64, 0);
}
}