From 08547818613137883b33808dc71039779e95a9fc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 3 Mar 2022 14:46:29 -0500 Subject: [PATCH] CTFE SwitchInt: update comment --- compiler/rustc_const_eval/src/interpret/terminator.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index 8094bf0cf2e..d2fbd6a9654 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -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,