Skip to content

Commit 0e4cba3

Browse files
add a comment
Co-authored-by: Frank Elsinga <frank@elsinga.de>
1 parent e8a2e09 commit 0e4cba3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

clippy_lints/src/manual_next_multiple_of.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ impl<'tcx> Pattern<'tcx> {
231231
};
232232

233233
// x = b - a % b
234+
// Since a - b % a can never overflow, checked_sub is not hanled and intentionally
234235
if let Some((lhs, rhs)) = unpack_bin_op(x, BinOpKind::Sub)
235236
&& eq_expr_value(cx, expr.span.ctxt(), lhs, b)
236237
&& let Some((lhs, rhs)) = unpack_rem(rhs)

0 commit comments

Comments
 (0)