This commit is contained in:
Oliver Schneider
2018-07-23 13:01:12 +02:00
parent ff0e5f967f
commit afd91248ed
81 changed files with 292 additions and 292 deletions

View File

@@ -117,11 +117,11 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for StringAdd {
}
}
fn is_string(cx: &LateContext, e: &Expr) -> bool {
fn is_string(cx: &LateContext<'_, '_>, e: &Expr) -> bool {
match_type(cx, walk_ptrs_ty(cx.tables.expr_ty(e)), &paths::STRING)
}
fn is_add(cx: &LateContext, src: &Expr, target: &Expr) -> bool {
fn is_add(cx: &LateContext<'_, '_>, src: &Expr, target: &Expr) -> bool {
match src.node {
ExprKind::Binary(Spanned { node: BinOpKind::Add, .. }, ref left, _) => SpanlessEq::new(cx).eq_expr(target, left),
ExprKind::Block(ref block, _) => {