about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/types/borrowed_box.rs4
-rw-r--r--clippy_lints/src/types/linked_list.rs4
-rw-r--r--clippy_lints/src/types/option_option.rs4
3 files changed, 9 insertions, 3 deletions
diff --git a/clippy_lints/src/types/borrowed_box.rs b/clippy_lints/src/types/borrowed_box.rs
index c9b96a7d325..a7a511b21cf 100644
--- a/clippy_lints/src/types/borrowed_box.rs
+++ b/clippy_lints/src/types/borrowed_box.rs
@@ -9,6 +9,8 @@ use if_chain::if_chain;
 
 use crate::utils::{match_path, paths, snippet, span_lint_and_sugg};
 
+use super::BORROWED_BOX;
+
 pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, mut_ty: &MutTy<'_>) -> bool {
     match mut_ty.ty.kind {
         TyKind::Path(ref qpath) => {
@@ -61,7 +63,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, m
                     };
                     span_lint_and_sugg(
                         cx,
-                        super::BORROWED_BOX,
+                        BORROWED_BOX,
                         hir_ty.span,
                         "you seem to be trying to use `&Box<T>`. Consider using just `&T`",
                         "try",
diff --git a/clippy_lints/src/types/linked_list.rs b/clippy_lints/src/types/linked_list.rs
index 74be8959fa4..47eb4ede4e4 100644
--- a/clippy_lints/src/types/linked_list.rs
+++ b/clippy_lints/src/types/linked_list.rs
@@ -3,11 +3,13 @@ use rustc_lint::LateContext;
 
 use crate::utils::{match_def_path, paths, span_lint_and_help};
 
+use super::LINKEDLIST;
+
 pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, def_id: DefId) -> bool {
     if match_def_path(cx, def_id, &paths::LINKED_LIST) {
         span_lint_and_help(
             cx,
-            super::LINKEDLIST,
+            LINKEDLIST,
             hir_ty.span,
             "you seem to be using a `LinkedList`! Perhaps you meant some other data structure?",
             None,
diff --git a/clippy_lints/src/types/option_option.rs b/clippy_lints/src/types/option_option.rs
index d91132aaeb2..a1fc26f7865 100644
--- a/clippy_lints/src/types/option_option.rs
+++ b/clippy_lints/src/types/option_option.rs
@@ -4,12 +4,14 @@ use rustc_span::symbol::sym;
 
 use crate::utils::{is_ty_param_diagnostic_item, span_lint};
 
+use super::OPTION_OPTION;
+
 pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool {
     if cx.tcx.is_diagnostic_item(sym::option_type, def_id) {
         if is_ty_param_diagnostic_item(cx, qpath, sym::option_type).is_some() {
             span_lint(
                 cx,
-                super::OPTION_OPTION,
+                OPTION_OPTION,
                 hir_ty.span,
                 "consider using `Option<T>` instead of `Option<Option<T>>` or a custom \
                                  enum if you need to distinguish all 3 cases",