1
Fork 0
This commit is contained in:
Yuki Okushi 2019-12-27 16:12:26 +09:00
parent b0c4744d57
commit e2636729ec
109 changed files with 735 additions and 655 deletions

View file

@ -28,7 +28,7 @@ declare_lint_pass!(OverflowCheckConditional => [OVERFLOW_CHECK_CONDITIONAL]);
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OverflowCheckConditional {
// a + b < a, a > a + b, a < a - b, a - b > a
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
let eq = |l, r| SpanlessEq::new(cx).eq_path_segment(l, r);
if_chain! {
if let ExprKind::Binary(ref op, ref first, ref second) = expr.kind;