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 {
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 (
You can’t perform that action at this time.
0 commit comments