about summary refs log tree commit diff
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2023-06-01 00:05:12 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2023-06-01 00:05:55 -0700
commit73f104b6d6d5ae058a06a0f8eec3f370093e91a4 (patch)
treef8a8ce5a6950ab1e4b51958f1056177e3bde3ba5
parentdc353f13b83f37ce5576788246acc7a109c17171 (diff)
downloadrust-73f104b6d6d5ae058a06a0f8eec3f370093e91a4.tar.gz
rust-73f104b6d6d5ae058a06a0f8eec3f370093e91a4.zip
remove unchecked_div/_rem from ctfe
-rw-r--r--compiler/rustc_const_eval/src/interpret/intrinsics.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
index a77c699c22f..a4b58c9849b 100644
--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
@@ -233,9 +233,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
             | sym::unchecked_shr
             | sym::unchecked_add
             | sym::unchecked_sub
-            | sym::unchecked_mul
-            | sym::unchecked_div
-            | sym::unchecked_rem => {
+            | sym::unchecked_mul => {
                 let l = self.read_immediate(&args[0])?;
                 let r = self.read_immediate(&args[1])?;
                 let bin_op = match intrinsic_name {
@@ -244,8 +242,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                     sym::unchecked_add => BinOp::Add,
                     sym::unchecked_sub => BinOp::Sub,
                     sym::unchecked_mul => BinOp::Mul,
-                    sym::unchecked_div => BinOp::Div,
-                    sym::unchecked_rem => BinOp::Rem,
                     _ => bug!(),
                 };
                 let (val, overflowed, _ty) = self.overflowing_binary_op(bin_op, &l, &r)?;