@@ -283,11 +283,11 @@ impl<'tcx> InferCtxtInner<'tcx> {
283
283
pub struct InferCtxt < ' a , ' tcx > {
284
284
pub tcx : TyCtxt < ' tcx > ,
285
285
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
288
288
/// used for reading closure kinds/signatures as they are inferred,
289
289
/// 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 > > > ,
291
291
292
292
pub inner : RefCell < InferCtxtInner < ' tcx > > ,
293
293
@@ -571,7 +571,7 @@ impl<'tcx> fmt::Display for FixupError<'tcx> {
571
571
/// `F: for<'b, 'tcx> where 'tcx FnOnce(InferCtxt<'b, 'tcx>)`.
572
572
pub struct InferCtxtBuilder < ' tcx > {
573
573
tcx : TyCtxt < ' tcx > ,
574
- fresh_tables : Option < RefCell < ty:: TypeckTables < ' tcx > > > ,
574
+ fresh_typeck_results : Option < RefCell < ty:: TypeckResults < ' tcx > > > ,
575
575
}
576
576
577
577
pub trait TyCtxtInferExt < ' tcx > {
@@ -580,15 +580,15 @@ pub trait TyCtxtInferExt<'tcx> {
580
580
581
581
impl TyCtxtInferExt < ' tcx > for TyCtxt < ' tcx > {
582
582
fn infer_ctxt ( self ) -> InferCtxtBuilder < ' tcx > {
583
- InferCtxtBuilder { tcx : self , fresh_tables : None }
583
+ InferCtxtBuilder { tcx : self , fresh_typeck_results : None }
584
584
}
585
585
}
586
586
587
587
impl < ' tcx > InferCtxtBuilder < ' tcx > {
588
588
/// 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) ) ) ;
592
592
self
593
593
}
594
594
@@ -616,11 +616,11 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
616
616
}
617
617
618
618
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 ( ) ;
621
621
f ( InferCtxt {
622
622
tcx,
623
- in_progress_tables ,
623
+ in_progress_typeck_results ,
624
624
inner : RefCell :: new ( InferCtxtInner :: new ( ) ) ,
625
625
lexical_region_resolutions : RefCell :: new ( None ) ,
626
626
selection_cache : Default :: default ( ) ,
@@ -667,7 +667,7 @@ pub struct CombinedSnapshot<'a, 'tcx> {
667
667
region_constraints_snapshot : RegionSnapshot ,
668
668
universe : ty:: UniverseIndex ,
669
669
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 > > > ,
671
671
}
672
672
673
673
impl < ' a , ' tcx > InferCtxt < ' a , ' tcx > {
@@ -789,9 +789,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
789
789
region_constraints_snapshot : inner. unwrap_region_constraints ( ) . start_snapshot ( ) ,
790
790
universe : self . universe ( ) ,
791
791
was_in_snapshot : in_snapshot,
792
- // Borrow tables "in progress" (i.e., during typeck)
792
+ // Borrow typeck results "in progress" (i.e., during typeck)
793
793
// 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 ( ) ) ,
795
797
}
796
798
}
797
799
@@ -802,7 +804,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
802
804
region_constraints_snapshot,
803
805
universe,
804
806
was_in_snapshot,
805
- _in_progress_tables ,
807
+ _in_progress_typeck_results ,
806
808
} = snapshot;
807
809
808
810
self . in_snapshot . set ( was_in_snapshot) ;
@@ -820,7 +822,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
820
822
region_constraints_snapshot : _,
821
823
universe : _,
822
824
was_in_snapshot,
823
- _in_progress_tables ,
825
+ _in_progress_typeck_results ,
824
826
} = snapshot;
825
827
826
828
self . in_snapshot . set ( was_in_snapshot) ;
0 commit comments