BinOpKind
This commit is contained in:
parent
1bd17e4fa2
commit
5d4102ee78
36 changed files with 260 additions and 248 deletions
|
@ -33,7 +33,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
|||
// check for instances of 0.0/0.0
|
||||
if_chain! {
|
||||
if let ExprKind::Binary(ref op, ref left, ref right) = expr.node;
|
||||
if let BinOp_::BiDiv = op.node;
|
||||
if let BinOpKind::Div = op.node;
|
||||
// TODO - constant_simple does not fold many operations involving floats.
|
||||
// That's probably fine for this lint - it's pretty unlikely that someone would
|
||||
// do something like 0.0/(2.0 - 2.0), but it would be nice to warn on that case too.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue