@@ -16,13 +16,13 @@ use rustc_data_structures::fx::FxHashMap;
1616use rustc_data_structures:: small_c_str:: SmallCStr ;
1717use rustc_middle:: bug;
1818use rustc_middle:: mir:: mono:: CodegenUnit ;
19- use rustc_middle:: ty:: layout:: { HasParamEnv , LayoutError , TyAndLayout } ;
19+ use rustc_middle:: ty:: layout:: { HasParamEnv , LayoutError , LayoutOf , TyAndLayout } ;
2020use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt } ;
2121use rustc_session:: config:: { CFGuard , CrateType , DebugInfo } ;
2222use rustc_session:: Session ;
2323use rustc_span:: source_map:: { Span , DUMMY_SP } ;
2424use rustc_span:: symbol:: Symbol ;
25- use rustc_target:: abi:: { HasDataLayout , LayoutOf , PointeeInfo , Size , TargetDataLayout , VariantIdx } ;
25+ use rustc_target:: abi:: { HasDataLayout , PointeeInfo , Size , TargetDataLayout , VariantIdx } ;
2626use rustc_target:: spec:: { HasTargetSpec , RelocModel , Target , TlsModel } ;
2727use smallvec:: SmallVec ;
2828
@@ -836,14 +836,13 @@ impl ty::layout::HasTyCtxt<'tcx> for CodegenCx<'ll, 'tcx> {
836836}
837837
838838impl LayoutOf < ' tcx > for CodegenCx < ' ll , ' tcx > {
839- type Ty = Ty < ' tcx > ;
840- type TyAndLayout = TyAndLayout < ' tcx > ;
839+ type LayoutOfResult = TyAndLayout < ' tcx > ;
841840
842- fn layout_of ( & self , ty : Ty < ' tcx > ) -> Self :: TyAndLayout {
841+ fn layout_of ( & self , ty : Ty < ' tcx > ) -> Self :: LayoutOfResult {
843842 self . spanned_layout_of ( ty, DUMMY_SP )
844843 }
845844
846- fn spanned_layout_of ( & self , ty : Ty < ' tcx > , span : Span ) -> Self :: TyAndLayout {
845+ fn spanned_layout_of ( & self , ty : Ty < ' tcx > , span : Span ) -> Self :: LayoutOfResult {
847846 self . tcx . layout_of ( ty:: ParamEnv :: reveal_all ( ) . and ( ty) ) . unwrap_or_else ( |e| {
848847 if let LayoutError :: SizeOverflow ( _) = e {
849848 self . sess ( ) . span_fatal ( span, & e. to_string ( ) )
0 commit comments