1
Fork 0

Update for hir renamings in rustc

This commit is contained in:
Oliver Schneider 2018-07-16 15:07:39 +02:00
parent 8e929946fd
commit 6992937002
41 changed files with 181 additions and 153 deletions

View file

@ -43,7 +43,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OverflowCheckConditional {
if cx.tables.expr_ty(ident2).is_integral();
then {
if let BinOpKind::Lt = op.node {
if let BinOpKindAdd = op2.node {
if let BinOpKind::Add = op2.node {
span_lint(cx, OVERFLOW_CHECK_CONDITIONAL, expr.span,
"You are trying to use classic C overflow conditions that will fail in Rust.");
}
@ -68,7 +68,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OverflowCheckConditional {
if cx.tables.expr_ty(ident2).is_integral();
then {
if let BinOpKind::Gt = op.node {
if let BinOpKindAdd = op2.node {
if let BinOpKind::Add = op2.node {
span_lint(cx, OVERFLOW_CHECK_CONDITIONAL, expr.span,
"You are trying to use classic C overflow conditions that will fail in Rust.");
}