@@ -283,11 +283,11 @@ impl<'tcx> InferCtxtInner<'tcx> {
283283pub struct InferCtxt < ' a , ' tcx > {
284284 pub tcx : TyCtxt < ' tcx > ,
285285
286- /// During type-checking/inference of a body, `in_progress_tables `
287- /// contains a reference to the tables being built up, which are
286+ /// During type-checking/inference of a body, `in_progress_typeck_results `
287+ /// contains a reference to the typeck results being built up, which are
288288 /// used for reading closure kinds/signatures as they are inferred,
289289 /// and for error reporting logic to read arbitrary node types.
290- pub in_progress_tables : Option < & ' a RefCell < ty:: TypeckTables < ' tcx > > > ,
290+ pub in_progress_typeck_results : Option < & ' a RefCell < ty:: TypeckResults < ' tcx > > > ,
291291
292292 pub inner : RefCell < InferCtxtInner < ' tcx > > ,
293293
@@ -571,7 +571,7 @@ impl<'tcx> fmt::Display for FixupError<'tcx> {
571571/// `F: for<'b, 'tcx> where 'tcx FnOnce(InferCtxt<'b, 'tcx>)`.
572572pub struct InferCtxtBuilder < ' tcx > {
573573 tcx : TyCtxt < ' tcx > ,
574- fresh_tables : Option < RefCell < ty:: TypeckTables < ' tcx > > > ,
574+ fresh_typeck_results : Option < RefCell < ty:: TypeckResults < ' tcx > > > ,
575575}
576576
577577pub trait TyCtxtInferExt < ' tcx > {
@@ -580,15 +580,15 @@ pub trait TyCtxtInferExt<'tcx> {
580580
581581impl TyCtxtInferExt < ' tcx > for TyCtxt < ' tcx > {
582582 fn infer_ctxt ( self ) -> InferCtxtBuilder < ' tcx > {
583- InferCtxtBuilder { tcx : self , fresh_tables : None }
583+ InferCtxtBuilder { tcx : self , fresh_typeck_results : None }
584584 }
585585}
586586
587587impl < ' tcx > InferCtxtBuilder < ' tcx > {
588588 /// Used only by `rustc_typeck` during body type-checking/inference,
589- /// will initialize `in_progress_tables ` with fresh `TypeckTables `.
590- pub fn with_fresh_in_progress_tables ( mut self , table_owner : LocalDefId ) -> Self {
591- self . fresh_tables = Some ( RefCell :: new ( ty:: TypeckTables :: new ( table_owner) ) ) ;
589+ /// will initialize `in_progress_typeck_results ` with fresh `TypeckResults `.
590+ pub fn with_fresh_in_progress_typeck_results ( mut self , table_owner : LocalDefId ) -> Self {
591+ self . fresh_typeck_results = Some ( RefCell :: new ( ty:: TypeckResults :: new ( table_owner) ) ) ;
592592 self
593593 }
594594
@@ -616,11 +616,11 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
616616 }
617617
618618 pub fn enter < R > ( & mut self , f : impl for < ' a > FnOnce ( InferCtxt < ' a , ' tcx > ) -> R ) -> R {
619- let InferCtxtBuilder { tcx, ref fresh_tables } = * self ;
620- let in_progress_tables = fresh_tables . as_ref ( ) ;
619+ let InferCtxtBuilder { tcx, ref fresh_typeck_results } = * self ;
620+ let in_progress_typeck_results = fresh_typeck_results . as_ref ( ) ;
621621 f ( InferCtxt {
622622 tcx,
623- in_progress_tables ,
623+ in_progress_typeck_results ,
624624 inner : RefCell :: new ( InferCtxtInner :: new ( ) ) ,
625625 lexical_region_resolutions : RefCell :: new ( None ) ,
626626 selection_cache : Default :: default ( ) ,
@@ -667,7 +667,7 @@ pub struct CombinedSnapshot<'a, 'tcx> {
667667 region_constraints_snapshot : RegionSnapshot ,
668668 universe : ty:: UniverseIndex ,
669669 was_in_snapshot : bool ,
670- _in_progress_tables : Option < Ref < ' a , ty:: TypeckTables < ' tcx > > > ,
670+ _in_progress_typeck_results : Option < Ref < ' a , ty:: TypeckResults < ' tcx > > > ,
671671}
672672
673673impl < ' a , ' tcx > InferCtxt < ' a , ' tcx > {
@@ -789,9 +789,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
789789 region_constraints_snapshot : inner. unwrap_region_constraints ( ) . start_snapshot ( ) ,
790790 universe : self . universe ( ) ,
791791 was_in_snapshot : in_snapshot,
792- // Borrow tables "in progress" (i.e., during typeck)
792+ // Borrow typeck results "in progress" (i.e., during typeck)
793793 // to ban writes from within a snapshot to them.
794- _in_progress_tables : self . in_progress_tables . map ( |tables| tables. borrow ( ) ) ,
794+ _in_progress_typeck_results : self
795+ . in_progress_typeck_results
796+ . map ( |typeck_results| typeck_results. borrow ( ) ) ,
795797 }
796798 }
797799
@@ -802,7 +804,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
802804 region_constraints_snapshot,
803805 universe,
804806 was_in_snapshot,
805- _in_progress_tables ,
807+ _in_progress_typeck_results ,
806808 } = snapshot;
807809
808810 self . in_snapshot . set ( was_in_snapshot) ;
@@ -820,7 +822,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
820822 region_constraints_snapshot : _,
821823 universe : _,
822824 was_in_snapshot,
823- _in_progress_tables ,
825+ _in_progress_typeck_results ,
824826 } = snapshot;
825827
826828 self . in_snapshot . set ( was_in_snapshot) ;
0 commit comments