Skip to content

Commit cf74814

Browse files
committed
test unchecked_rem
1 parent fc90124 commit cf74814

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/compile-fail/div-by-zero-3.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(core_intrinsics)]
2+
3+
use std::intrinsics::*;
4+
5+
//error-pattern: Division by 0 in unchecked_rem
6+
7+
fn main() {
8+
unsafe {
9+
let _n = unchecked_rem(3u32, 0);
10+
}
11+
}

0 commit comments

Comments
 (0)