Skip to content

Commit 2afa7df

Browse files
committed
Remove unused is_local from borrowed_box
1 parent 53d3ffe commit 2afa7df

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

clippy_lints/src/types/borrowed_box.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@ use if_chain::if_chain;
99

1010
use crate::utils::{match_path, paths, snippet, span_lint_and_sugg};
1111

12-
pub(super) fn check(
13-
cx: &LateContext<'_>,
14-
hir_ty: &hir::Ty<'_>,
15-
is_local: bool,
16-
lt: &Lifetime,
17-
mut_ty: &MutTy<'_>,
18-
) -> bool {
12+
pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, lt: &Lifetime, mut_ty: &MutTy<'_>) -> bool {
1913
match mut_ty.ty.kind {
2014
TyKind::Path(ref qpath) => {
2115
let hir_id = mut_ty.ty.hir_id;

clippy_lints/src/types/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ impl Types {
312312
/// Recursively check for `TypePass` lints in the given type. Stop at the first
313313
/// lint found.
314314
///
315-
/// The parameter `is_local` distinguishes the context of the type; types from
316-
/// local bindings should only be checked for the `BORROWED_BOX` lint.
315+
/// The parameter `is_local` distinguishes the context of the type.
317316
fn check_ty(&mut self, cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, is_local: bool) {
318317
if hir_ty.span.from_expansion() {
319318
return;
@@ -378,7 +377,7 @@ impl Types {
378377
}
379378
},
380379
TyKind::Rptr(ref lt, ref mut_ty) => {
381-
if !borrowed_box::check(cx, hir_ty, is_local, lt, mut_ty) {
380+
if !borrowed_box::check(cx, hir_ty, lt, mut_ty) {
382381
self.check_ty(cx, &mut_ty.ty, is_local);
383382
}
384383
},

0 commit comments

Comments
 (0)