diff options
| author | bors <bors@rust-lang.org> | 2021-07-09 14:00:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-07-09 14:00:52 +0000 |
| commit | cb16543b3a3ee3769dc07ca191e15988758ced0e (patch) | |
| tree | 095eec4d8b4442a221765ffd451f4c39d88043c1 /clippy_lints/src/len_zero.rs | |
| parent | 8da39e66accb19d655d8675fc523750dc7ddf207 (diff) | |
| parent | d2c8f50bbed32a6bcec5f397043342c980e945b3 (diff) | |
Auto merge of #7449 - flip1995:remove-lints_enabled, r=camsteffen
Remove lints_enabled r? `@camsteffen` cc https://github.com/rust-lang/rust-clippy/pull/7448#issuecomment-876497862 I haven't added a variant with `last_node_with_lint_attrs` yet, since I didn't see a usecase for this. Also this field is not documented, so I'm wondering how it behaves with command line lints and so on. changelog: none
Diffstat (limited to 'clippy_lints/src/len_zero.rs')
| -rw-r--r-- | clippy_lints/src/len_zero.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index d69187f6746..892b3af0b32 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -1,6 +1,6 @@ use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg, span_lint_and_then}; use clippy_utils::source::snippet_with_applicability; -use clippy_utils::{get_item_name, get_parent_as_impl, is_allowed}; +use clippy_utils::{get_item_name, get_parent_as_impl, is_lint_allowed}; use if_chain::if_chain; use rustc_ast::ast::LitKind; use rustc_errors::Applicability; @@ -139,7 +139,7 @@ impl<'tcx> LateLintPass<'tcx> for LenZero { if let Some(ty_id) = cx.qpath_res(ty_path, imp.self_ty.hir_id).opt_def_id(); if let Some(local_id) = ty_id.as_local(); let ty_hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_id); - if !is_allowed(cx, LEN_WITHOUT_IS_EMPTY, ty_hir_id); + if !is_lint_allowed(cx, LEN_WITHOUT_IS_EMPTY, ty_hir_id); if let Some(output) = parse_len_output(cx, cx.tcx.fn_sig(item.def_id).skip_binder()); then { let (name, kind) = match cx.tcx.hir().find(ty_hir_id) { |
