File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,14 @@ impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom {
50
50
}
51
51
for ii in imp. items {
52
52
if ii. kind == AssocItemKind :: Type {
53
- let ii_id = ii. id ;
54
53
let ii = cx. tcx . hir_impl_item ( ii. id ) ;
55
54
if ii. ident . name != sym:: Error {
56
55
continue ;
57
56
}
58
57
let ii_ty = ii. expect_type ( ) ;
59
58
let ii_ty_span = ii_ty. span ;
60
59
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 ( ) ) {
62
61
let mut span = MultiSpan :: from_span ( cx. tcx . def_span ( item. owner_id . to_def_id ( ) ) ) ;
63
62
span. push_span_label ( ii_ty_span, "infallible error type" ) ;
64
63
span_lint (
You can’t perform that action at this time.
0 commit comments