rustup to 2017-01-12

This commit is contained in:
Oliver Schneider
2017-01-13 17:04:56 +01:00
parent d93b96949d
commit d944d7df9a
56 changed files with 245 additions and 239 deletions

View File

@@ -82,11 +82,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
if let hir::ExprBinary(binop, ref l, ref r) = rhs.node {
if op.node == binop.node {
let lint = |assignee: &hir::Expr, rhs: &hir::Expr| {
let ty = cx.tcx.tables().expr_ty(assignee);
let ty = cx.tables.expr_ty(assignee);
if ty.walk_shallow().next().is_some() {
return; // implements_trait does not work with generics
}
let rty = cx.tcx.tables().expr_ty(rhs);
let rty = cx.tables.expr_ty(rhs);
if rty.walk_shallow().next().is_some() {
return; // implements_trait does not work with generics
}
@@ -116,12 +116,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
},
hir::ExprAssign(ref assignee, ref e) => {
if let hir::ExprBinary(op, ref l, ref r) = e.node {
#[allow(cyclomatic_complexity)]
let lint = |assignee: &hir::Expr, rhs: &hir::Expr| {
let ty = cx.tcx.tables().expr_ty(assignee);
let ty = cx.tables.expr_ty(assignee);
if ty.walk_shallow().next().is_some() {
return; // implements_trait does not work with generics
}
let rty = cx.tcx.tables().expr_ty(rhs);
let rty = cx.tables.expr_ty(rhs);
if rty.walk_shallow().next().is_some() {
return; // implements_trait does not work with generics
}