diff --git a/src/librustc_mir/interpret/operator.rs b/src/librustc_mir/interpret/operator.rs index a74fe63e53c..dfc0c4a824a 100644 --- a/src/librustc_mir/interpret/operator.rs +++ b/src/librustc_mir/interpret/operator.rs @@ -90,7 +90,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> { let signed = left_layout.abi.is_signed(); let mut r = r as u32; let size = left_layout.size.bits() as u32; - let oflo = r > size; + let oflo = r >= size; if oflo { r %= size; }