about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2021-02-12 15:26:36 +0900
committerYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2021-03-09 00:50:22 +0900
commit2afa7df564e6b6d2126578fd9b997d6c2abc4935 (patch)
tree0a5172bd92e3bbd69933fd05d1c06c3e53a10db2
parent53d3ffe5395da729bbfed53dee826ad4ad1feb63 (diff)
downloadrust-2afa7df564e6b6d2126578fd9b997d6c2abc4935.tar.gz
rust-2afa7df564e6b6d2126578fd9b997d6c2abc4935.zip
Remove unused is_local from borrowed_box
-rw-r--r--clippy_lints/src/types/borrowed_box.rs8
-rw-r--r--clippy_lints/src/types/mod.rs5
2 files changed, 3 insertions, 10 deletions
diff --git a/clippy_lints/src/types/borrowed_box.rs b/clippy_lints/src/types/borrowed_box.rs
index 4c2cad0ee94..c9b96a7d325 100644
--- a/clippy_lints/src/types/borrowed_box.rs
+++ b/clippy_lints/src/types/borrowed_box.rs
@@ -9,13 +9,7 @@ use if_chain::if_chain;
 
 use crate::utils::{match_path, paths, snippet, span_lint_and_sugg};
 
-pub(super) fn check(
-    cx: &LateContext<'_>,
-    hir_ty: &hir::Ty<'_>,
-    is_local: bool,
-    lt: &Lifetime,
-    mut_ty: &MutTy<'_>,
-) -> bool {
+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) => {
             let hir_id = mut_ty.ty.hir_id;
diff --git a/clippy_lints/src/types/mod.rs b/clippy_lints/src/types/mod.rs
index 8c2fc553085..25cc40917c3 100644
--- a/clippy_lints/src/types/mod.rs
+++ b/clippy_lints/src/types/mod.rs
@@ -312,8 +312,7 @@ impl Types {
     /// Recursively check for `TypePass` lints in the given type. Stop at the first
     /// lint found.
     ///
-    /// The parameter `is_local` distinguishes the context of the type; types from
-    /// local bindings should only be checked for the `BORROWED_BOX` lint.
+    /// The parameter `is_local` distinguishes the context of the type.
     fn check_ty(&mut self, cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, is_local: bool) {
         if hir_ty.span.from_expansion() {
             return;
@@ -378,7 +377,7 @@ impl Types {
                 }
             },
             TyKind::Rptr(ref lt, ref mut_ty) => {
-                if !borrowed_box::check(cx, hir_ty, is_local, lt, mut_ty) {
+                if !borrowed_box::check(cx, hir_ty, lt, mut_ty) {
                     self.check_ty(cx, &mut_ty.ty, is_local);
                 }
             },