about summary refs log tree commit diff
path: root/clippy_lints/src/ptr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-09 14:00:52 +0000
committerbors <bors@rust-lang.org>2021-07-09 14:00:52 +0000
commitcb16543b3a3ee3769dc07ca191e15988758ced0e (patch)
tree095eec4d8b4442a221765ffd451f4c39d88043c1 /clippy_lints/src/ptr.rs
parent8da39e66accb19d655d8675fc523750dc7ddf207 (diff)
parentd2c8f50bbed32a6bcec5f397043342c980e945b3 (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/ptr.rs')
-rw-r--r--clippy_lints/src/ptr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/ptr.rs b/clippy_lints/src/ptr.rs
index 12c44436874..dba3b1805cd 100644
--- a/clippy_lints/src/ptr.rs
+++ b/clippy_lints/src/ptr.rs
@@ -4,7 +4,7 @@ use clippy_utils::diagnostics::{span_lint, span_lint_and_sugg, span_lint_and_the
 use clippy_utils::ptr::get_spans;
 use clippy_utils::source::snippet_opt;
 use clippy_utils::ty::{is_type_diagnostic_item, match_type, walk_ptrs_hir_ty};
-use clippy_utils::{expr_path_res, is_allowed, match_any_def_paths, paths};
+use clippy_utils::{expr_path_res, is_lint_allowed, match_any_def_paths, paths};
 use if_chain::if_chain;
 use rustc_errors::Applicability;
 use rustc_hir::{
@@ -246,7 +246,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
     for (idx, (arg, ty)) in decl.inputs.iter().zip(fn_ty.inputs()).enumerate() {
         // Honor the allow attribute on parameters. See issue 5644.
         if let Some(body) = &body {
-            if is_allowed(cx, PTR_ARG, body.params[idx].hir_id) {
+            if is_lint_allowed(cx, PTR_ARG, body.params[idx].hir_id) {
                 continue;
             }
         }