Merge commit '54a20a02ecd0e1352a871aa0990bcc8b8b03173e' into clippyup
This commit is contained in:
@@ -2,7 +2,7 @@ use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_and_sug
|
||||
use clippy_utils::source::{snippet, snippet_with_applicability};
|
||||
use clippy_utils::ty::is_type_diagnostic_item;
|
||||
use clippy_utils::SpanlessEq;
|
||||
use clippy_utils::{get_parent_expr, is_allowed, match_function_call, method_calls, paths};
|
||||
use clippy_utils::{get_parent_expr, is_lint_allowed, match_function_call, method_calls, paths};
|
||||
use if_chain::if_chain;
|
||||
use rustc_errors::Applicability;
|
||||
use rustc_hir::{BinOpKind, BorrowKind, Expr, ExprKind, LangItem, QPath};
|
||||
@@ -124,7 +124,7 @@ impl<'tcx> LateLintPass<'tcx> for StringAdd {
|
||||
) = e.kind
|
||||
{
|
||||
if is_string(cx, left) {
|
||||
if !is_allowed(cx, STRING_ADD_ASSIGN, e.hir_id) {
|
||||
if !is_lint_allowed(cx, STRING_ADD_ASSIGN, e.hir_id) {
|
||||
let parent = get_parent_expr(cx, e);
|
||||
if let Some(p) = parent {
|
||||
if let ExprKind::Assign(target, _, _) = p.kind {
|
||||
|
||||
Reference in New Issue
Block a user