rustup to 2017-01-12
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user