Skip to content

Commit 982dc75

Browse files
committed
Add some TODO comments
1 parent e330bc3 commit 982dc75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_lints/src/casts/cast_sign_loss.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ fn should_lint<'cx>(cx: &LateContext<'cx>, cast_op: &Expr<'_>, cast_from: Ty<'cx
6363
return false;
6464
}
6565

66+
// We don't check for sums of all-positive or all-negative values, but we could.
6667
if let Sign::ZeroOrPositive = expr_muldiv_sign(cx, cast_op) {
6768
return false;
6869
}
@@ -222,6 +223,7 @@ fn exprs_with_muldiv_binop_peeled<'e>(expr: &'e Expr<'_>) -> Vec<&'e Expr<'e>> {
222223
let mut res = vec![];
223224

224225
for_each_expr(expr, |sub_expr| {
226+
// We don't check for mul/div/rem methods here, but we could.
225227
if let ExprKind::Binary(op, lhs, _rhs) = sub_expr.kind {
226228
if matches!(op.node, BinOpKind::Mul | BinOpKind::Div) {
227229
// For binary operators which both contribute to the sign of the result,

0 commit comments

Comments
 (0)