@@ -76,23 +76,23 @@ pub type Bound<T> = Option<T>;
7676pub type UnitResult < ' tcx > = RelateResult < ' tcx , ( ) > ; // "unify result"
7777pub type FixupResult < T > = Result < T , FixupError > ; // "fixup result"
7878
79- /// A version of &ty::Tables which can be `Missing` (not needed),
79+ /// A version of &ty::TypeckTables which can be `Missing` (not needed),
8080/// `InProgress` (during typeck) or `Interned` (result of typeck).
8181/// Only the `InProgress` version supports `borrow_mut`.
8282#[ derive( Copy , Clone ) ]
8383pub enum InferTables < ' a , ' gcx : ' a +' tcx , ' tcx : ' a > {
84- Interned ( & ' a ty:: Tables < ' gcx > ) ,
85- InProgress ( & ' a RefCell < ty:: Tables < ' tcx > > ) ,
84+ Interned ( & ' a ty:: TypeckTables < ' gcx > ) ,
85+ InProgress ( & ' a RefCell < ty:: TypeckTables < ' tcx > > ) ,
8686 Missing
8787}
8888
8989pub enum InferTablesRef < ' a , ' gcx : ' a +' tcx , ' tcx : ' a > {
90- Interned ( & ' a ty:: Tables < ' gcx > ) ,
91- InProgress ( Ref < ' a , ty:: Tables < ' tcx > > )
90+ Interned ( & ' a ty:: TypeckTables < ' gcx > ) ,
91+ InProgress ( Ref < ' a , ty:: TypeckTables < ' tcx > > )
9292}
9393
9494impl < ' a , ' gcx , ' tcx > Deref for InferTablesRef < ' a , ' gcx , ' tcx > {
95- type Target = ty:: Tables < ' tcx > ;
95+ type Target = ty:: TypeckTables < ' tcx > ;
9696 fn deref ( & self ) -> & Self :: Target {
9797 match * self {
9898 InferTablesRef :: Interned ( tables) => tables,
@@ -112,7 +112,7 @@ impl<'a, 'gcx, 'tcx> InferTables<'a, 'gcx, 'tcx> {
112112 }
113113 }
114114
115- pub fn expect_interned ( self ) -> & ' a ty:: Tables < ' gcx > {
115+ pub fn expect_interned ( self ) -> & ' a ty:: TypeckTables < ' gcx > {
116116 match self {
117117 InferTables :: Interned ( tables) => tables,
118118 InferTables :: InProgress ( _) => {
@@ -124,7 +124,7 @@ impl<'a, 'gcx, 'tcx> InferTables<'a, 'gcx, 'tcx> {
124124 }
125125 }
126126
127- pub fn borrow_mut ( self ) -> RefMut < ' a , ty:: Tables < ' tcx > > {
127+ pub fn borrow_mut ( self ) -> RefMut < ' a , ty:: TypeckTables < ' tcx > > {
128128 match self {
129129 InferTables :: Interned ( _) => {
130130 bug ! ( "InferTables: infcx.tables.borrow_mut() outside of type-checking" ) ;
@@ -407,51 +407,51 @@ impl fmt::Display for FixupError {
407407
408408pub trait InferEnv < ' a , ' tcx > {
409409 fn to_parts ( self , tcx : TyCtxt < ' a , ' tcx , ' tcx > )
410- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
411- Option < ty:: Tables < ' tcx > > ,
410+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
411+ Option < ty:: TypeckTables < ' tcx > > ,
412412 Option < ty:: ParameterEnvironment < ' tcx > > ) ;
413413}
414414
415415impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ) {
416416 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
417- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
418- Option < ty:: Tables < ' tcx > > ,
417+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
418+ Option < ty:: TypeckTables < ' tcx > > ,
419419 Option < ty:: ParameterEnvironment < ' tcx > > ) {
420420 ( None , None , None )
421421 }
422422}
423423
424424impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ty:: ParameterEnvironment < ' tcx > {
425425 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
426- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
427- Option < ty:: Tables < ' tcx > > ,
426+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
427+ Option < ty:: TypeckTables < ' tcx > > ,
428428 Option < ty:: ParameterEnvironment < ' tcx > > ) {
429429 ( None , None , Some ( self ) )
430430 }
431431}
432432
433- impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( & ' a ty:: Tables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
433+ impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( & ' a ty:: TypeckTables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
434434 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
435- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
436- Option < ty:: Tables < ' tcx > > ,
435+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
436+ Option < ty:: TypeckTables < ' tcx > > ,
437437 Option < ty:: ParameterEnvironment < ' tcx > > ) {
438438 ( Some ( self . 0 ) , None , Some ( self . 1 ) )
439439 }
440440}
441441
442- impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ty:: Tables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
442+ impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for ( ty:: TypeckTables < ' tcx > , ty:: ParameterEnvironment < ' tcx > ) {
443443 fn to_parts ( self , _: TyCtxt < ' a , ' tcx , ' tcx > )
444- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
445- Option < ty:: Tables < ' tcx > > ,
444+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
445+ Option < ty:: TypeckTables < ' tcx > > ,
446446 Option < ty:: ParameterEnvironment < ' tcx > > ) {
447447 ( None , Some ( self . 0 ) , Some ( self . 1 ) )
448448 }
449449}
450450
451451impl < ' a , ' tcx > InferEnv < ' a , ' tcx > for hir:: BodyId {
452452 fn to_parts ( self , tcx : TyCtxt < ' a , ' tcx , ' tcx > )
453- -> ( Option < & ' a ty:: Tables < ' tcx > > ,
454- Option < ty:: Tables < ' tcx > > ,
453+ -> ( Option < & ' a ty:: TypeckTables < ' tcx > > ,
454+ Option < ty:: TypeckTables < ' tcx > > ,
455455 Option < ty:: ParameterEnvironment < ' tcx > > ) {
456456 let item_id = tcx. map . body_owner ( self ) ;
457457 ( Some ( tcx. item_tables ( tcx. map . local_def_id ( item_id) ) ) ,
@@ -466,8 +466,8 @@ impl<'a, 'tcx> InferEnv<'a, 'tcx> for hir::BodyId {
466466pub struct InferCtxtBuilder < ' a , ' gcx : ' a +' tcx , ' tcx : ' a > {
467467 global_tcx : TyCtxt < ' a , ' gcx , ' gcx > ,
468468 arena : DroplessArena ,
469- fresh_tables : Option < RefCell < ty:: Tables < ' tcx > > > ,
470- tables : Option < & ' a ty:: Tables < ' gcx > > ,
469+ fresh_tables : Option < RefCell < ty:: TypeckTables < ' tcx > > > ,
470+ tables : Option < & ' a ty:: TypeckTables < ' gcx > > ,
471471 param_env : Option < ty:: ParameterEnvironment < ' gcx > > ,
472472 projection_mode : Reveal ,
473473}
0 commit comments