Skip to content

Commit ace0b85

Browse files
committed
clean up local bindings
1 parent 1428d7c commit ace0b85

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/infallible_try_from.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom {
5050
}
5151
for ii in imp.items {
5252
if ii.kind == AssocItemKind::Type {
53-
let ii_id = ii.id;
5453
let ii = cx.tcx.hir_impl_item(ii.id);
5554
if ii.ident.name != sym::Error {
5655
continue;
5756
}
5857
let ii_ty = ii.expect_type();
5958
let ii_ty_span = ii_ty.span;
6059
let ii_ty = clippy_utils::ty::ty_from_hir_ty(cx, ii_ty);
61-
if !ii_ty.is_inhabited_from(cx.tcx, ii_id.owner_id.to_def_id(), cx.typing_env()) {
60+
if !ii_ty.is_inhabited_from(cx.tcx, ii.owner_id.to_def_id(), cx.typing_env()) {
6261
let mut span = MultiSpan::from_span(cx.tcx.def_span(item.owner_id.to_def_id()));
6362
span.push_span_label(ii_ty_span, "infallible error type");
6463
span_lint(

0 commit comments

Comments
 (0)