@@ -4,7 +4,7 @@ use rustc_errors::Applicability;
44use  rustc_hir:: intravisit:: FnKind ; 
55use  rustc_hir:: { 
66    Block ,  Body ,  Closure ,  ClosureKind ,  CoroutineDesugaring ,  CoroutineKind ,  CoroutineSource ,  Expr ,  ExprKind ,  FnDecl , 
7-     FnRetTy ,  GenericArg ,  GenericBound ,  ImplItem ,  Item ,  ItemKind ,   LifetimeName ,  Node ,  TraitRef ,  Ty ,  TyKind , 
7+     FnRetTy ,  GenericArg ,  GenericBound ,  ImplItem ,  Item ,  LifetimeName ,  Node ,  TraitRef ,  Ty ,  TyKind , 
88} ; 
99use  rustc_lint:: { LateContext ,  LateLintPass } ; 
1010use  rustc_session:: declare_lint_pass; 
@@ -105,9 +105,7 @@ fn future_trait_ref<'tcx>(
105105    cx :  & LateContext < ' tcx > , 
106106    ty :  & ' tcx  Ty < ' tcx > , 
107107)  -> Option < ( & ' tcx  TraitRef < ' tcx > ,  Vec < LifetimeName > ) >  { 
108-     if  let  TyKind :: OpaqueDef ( item_id,  bounds)  = ty. kind 
109-         && let  item = cx. tcx . hir ( ) . item ( item_id) 
110-         && let  ItemKind :: OpaqueTy ( opaque)  = & item. kind 
108+     if  let  TyKind :: OpaqueDef ( opaque,  bounds)  = ty. kind 
111109        && let  Some ( trait_ref)  = opaque. bounds . iter ( ) . find_map ( |bound| { 
112110            if  let  GenericBound :: Trait ( poly,  _)  = bound { 
113111                Some ( & poly. trait_ref ) 
0 commit comments