@@ -212,7 +212,7 @@ pub(crate) mod rustc {
212212 return Err ( Err :: TypeError ( e) ) ;
213213 }
214214
215- let target = cx. tcx . data_layout ( ) ;
215+ let target = cx. data_layout ( ) ;
216216 let pointer_size = target. pointer_size ;
217217
218218 match ty. kind ( ) {
@@ -320,7 +320,7 @@ pub(crate) mod rustc {
320320
321321 // Computes the variant of a given index.
322322 let layout_of_variant = |index, encoding : Option < TagEncoding < VariantIdx > > | {
323- let tag = cx. tcx . tag_for_variant ( ( cx. tcx . erase_regions ( ty) , index) ) ;
323+ let tag = cx. tcx ( ) . tag_for_variant ( ( cx. tcx ( ) . erase_regions ( ty) , index) ) ;
324324 let variant_def = Def :: Variant ( def. variant ( index) ) ;
325325 let variant_layout = ty_variant ( cx, ( ty, layout) , index) ;
326326 Self :: from_variant (
@@ -417,7 +417,7 @@ pub(crate) mod rustc {
417417 }
418418 }
419419 }
420- struct_tree = struct_tree. then ( Self :: from_tag ( * tag, cx. tcx ) ) ;
420+ struct_tree = struct_tree. then ( Self :: from_tag ( * tag, cx. tcx ( ) ) ) ;
421421 }
422422
423423 // Append the fields, in memory order, to the layout.
@@ -509,12 +509,12 @@ pub(crate) mod rustc {
509509 match layout. variants {
510510 Variants :: Single { index } => {
511511 let field = & def. variant ( index) . fields [ i] ;
512- field. ty ( cx. tcx , args)
512+ field. ty ( cx. tcx ( ) , args)
513513 }
514514 // Discriminant field for enums (where applicable).
515515 Variants :: Multiple { tag, .. } => {
516516 assert_eq ! ( i. as_usize( ) , 0 ) ;
517- ty:: layout:: PrimitiveExt :: to_ty ( & tag. primitive ( ) , cx. tcx )
517+ ty:: layout:: PrimitiveExt :: to_ty ( & tag. primitive ( ) , cx. tcx ( ) )
518518 }
519519 }
520520 }
@@ -531,7 +531,7 @@ pub(crate) mod rustc {
531531 ( ty, layout) : ( Ty < ' tcx > , Layout < ' tcx > ) ,
532532 i : VariantIdx ,
533533 ) -> Layout < ' tcx > {
534- let ty = cx. tcx . erase_regions ( ty) ;
534+ let ty = cx. tcx ( ) . erase_regions ( ty) ;
535535 TyAndLayout { ty, layout } . for_variant ( & cx, i) . layout
536536 }
537537}
0 commit comments