Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a0bf6d1

Browse files
committedMar 15, 2024
Remove feature(unchecked_math) from miri
1 parent 44502c5 commit a0bf6d1

File tree

6 files changed

+0
-8
lines changed

6 files changed

+0
-8
lines changed
 

‎src/tools/miri/tests/fail/intrinsics/unchecked_add1.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(unchecked_math)]
2-
31
fn main() {
42
// MAX overflow
53
let _val = unsafe { 40000u16.unchecked_add(30000) }; //~ ERROR: overflow executing `unchecked_add`

‎src/tools/miri/tests/fail/intrinsics/unchecked_add2.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(unchecked_math)]
2-
31
fn main() {
42
// MIN overflow
53
let _val = unsafe { (-30000i16).unchecked_add(-8000) }; //~ ERROR: overflow executing `unchecked_add`

‎src/tools/miri/tests/fail/intrinsics/unchecked_mul1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unchecked_math)]
21
fn main() {
32
// MAX overflow
43
let _val = unsafe { 300u16.unchecked_mul(250u16) }; //~ ERROR: overflow executing `unchecked_mul`

‎src/tools/miri/tests/fail/intrinsics/unchecked_mul2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unchecked_math)]
21
fn main() {
32
// MIN overflow
43
let _val = unsafe { 1_000_000_000i32.unchecked_mul(-4) }; //~ ERROR: overflow executing `unchecked_mul`

‎src/tools/miri/tests/fail/intrinsics/unchecked_sub1.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unchecked_math)]
21
fn main() {
32
// MIN overflow
43
let _val = unsafe { 14u32.unchecked_sub(22) }; //~ ERROR: overflow executing `unchecked_sub`

‎src/tools/miri/tests/fail/intrinsics/unchecked_sub2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(unchecked_math)]
21
fn main() {
32
// MAX overflow
43
let _val = unsafe { 30000i16.unchecked_sub(-7000) }; //~ ERROR: overflow executing `unchecked_sub`

0 commit comments

Comments
 (0)
Please sign in to comment.