Skip to content

Commit 73f104b

Browse files
committed
remove unchecked_div/_rem from ctfe
1 parent dc353f1 commit 73f104b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
233233
| sym::unchecked_shr
234234
| sym::unchecked_add
235235
| sym::unchecked_sub
236-
| sym::unchecked_mul
237-
| sym::unchecked_div
238-
| sym::unchecked_rem => {
236+
| sym::unchecked_mul => {
239237
let l = self.read_immediate(&args[0])?;
240238
let r = self.read_immediate(&args[1])?;
241239
let bin_op = match intrinsic_name {
@@ -244,8 +242,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
244242
sym::unchecked_add => BinOp::Add,
245243
sym::unchecked_sub => BinOp::Sub,
246244
sym::unchecked_mul => BinOp::Mul,
247-
sym::unchecked_div => BinOp::Div,
248-
sym::unchecked_rem => BinOp::Rem,
249245
_ => bug!(),
250246
};
251247
let (val, overflowed, _ty) = self.overflowing_binary_op(bin_op, &l, &r)?;

0 commit comments

Comments
 (0)