Skip to content

Commit 1da1ff6

Browse files
committed
Update Applicability of redundant_allocation lint from
`MachineApplicable` to `Unspecified`
1 parent b8a9a50 commit 1da1ff6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/types/redundant_allocation.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use rustc_span::symbol::sym;
1010
use super::{utils, REDUNDANT_ALLOCATION};
1111

1212
pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool {
13+
let mut applicability = Applicability::MaybeIncorrect;
1314
let outer_sym = if Some(def_id) == cx.tcx.lang_items().owned_box() {
1415
"Box"
1516
} else if cx.tcx.is_diagnostic_item(sym::Rc, def_id) {
@@ -21,7 +22,6 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
2122
};
2223

2324
if let Some(span) = utils::match_borrows_parameter(cx, qpath) {
24-
let mut applicability = Applicability::MaybeIncorrect;
2525
let generic_snippet = snippet_with_applicability(cx, span, "..", &mut applicability);
2626
span_lint_and_then(
2727
cx,
@@ -63,7 +63,6 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
6363
None => return false,
6464
};
6565
if inner_sym == outer_sym {
66-
let mut applicability = Applicability::MaybeIncorrect;
6766
let generic_snippet = snippet_with_applicability(cx, inner_span, "..", &mut applicability);
6867
span_lint_and_then(
6968
cx,

0 commit comments

Comments
 (0)