Rollup merge of #94575 - RalfJung:switchint-comment, r=oli-obk

CTFE SwitchInt: update comment

I just wondered why this doesn't use `binary_op`.

r? ```@oli-obk```
This commit is contained in:
Dylan DPC 2022-03-04 02:06:43 +01:00 committed by GitHub
commit 72c0c08445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let mut target_block = targets.otherwise();
for (const_int, target) in targets.iter() {
// Compare using binary_op, to also support pointer values
// Compare using MIR BinOp::Eq, to also support pointer values.
// (Avoiding `self.binary_op` as that does some redundant layout computation.)
let res = self
.overflowing_binary_op(
mir::BinOp::Eq,