@@ -68,7 +68,6 @@ use crate::infer::{
6868} ; 
6969use  crate :: traits:: { ObligationCause ,  ObligationCauseCode } ; 
7070use  rustc_data_structures:: undo_log:: UndoLogs ; 
71- use  rustc_hir as  hir; 
7271use  rustc_middle:: ty:: subst:: GenericArgKind ; 
7372use  rustc_middle:: ty:: { self ,  Region ,  Ty ,  TyCtxt ,  TypeFoldable } ; 
7473use  smallvec:: smallvec; 
@@ -79,16 +78,11 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
7978     /// and later processed by regionck, when full type information is 
8079     /// available (see `region_obligations` field for more 
8180     /// information). 
82-      pub  fn  register_region_obligation ( 
83-         & self , 
84-         body_id :  hir:: HirId , 
85-         obligation :  RegionObligation < ' tcx > , 
86-     )  { 
87-         debug ! ( "register_region_obligation(body_id={:?}, obligation={:?})" ,  body_id,  obligation) ; 
88- 
81+      #[ instrument( level = "debug" ,  skip( self ) ) ]  
82+     pub  fn  register_region_obligation ( & self ,  obligation :  RegionObligation < ' tcx > )  { 
8983        let  mut  inner = self . inner . borrow_mut ( ) ; 
9084        inner. undo_log . push ( UndoLog :: PushRegionObligation ) ; 
91-         inner. region_obligations . push ( ( body_id ,   obligation) ) ; 
85+         inner. region_obligations . push ( obligation) ; 
9286    } 
9387
9488    pub  fn  register_region_obligation_with_cause ( 
@@ -108,14 +102,11 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
108102            ) 
109103        } ) ; 
110104
111-         self . register_region_obligation ( 
112-             cause. body_id , 
113-             RegionObligation  {  sup_type,  sub_region,  origin } , 
114-         ) ; 
105+         self . register_region_obligation ( RegionObligation  {  sup_type,  sub_region,  origin } ) ; 
115106    } 
116107
117108    /// Trait queries just want to pass back type obligations "as is" 
118-      pub  fn  take_registered_region_obligations ( & self )  -> Vec < ( hir :: HirId ,   RegionObligation < ' tcx > ) >  { 
109+      pub  fn  take_registered_region_obligations ( & self )  -> Vec < RegionObligation < ' tcx > >  { 
119110        std:: mem:: take ( & mut  self . inner . borrow_mut ( ) . region_obligations ) 
120111    } 
121112
@@ -156,7 +147,7 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
156147
157148        let  my_region_obligations = self . take_registered_region_obligations ( ) ; 
158149
159-         for  ( _body_id ,   RegionObligation  {  sup_type,  sub_region,  origin } )  in  my_region_obligations { 
150+         for  RegionObligation  {  sup_type,  sub_region,  origin }  in  my_region_obligations { 
160151            debug ! ( 
161152                "process_registered_region_obligations: sup_type={:?} sub_region={:?} origin={:?}" , 
162153                sup_type,  sub_region,  origin
0 commit comments