@@ -16,13 +16,13 @@ use rustc_data_structures::fx::FxHashMap;
16
16
use rustc_data_structures:: small_c_str:: SmallCStr ;
17
17
use rustc_middle:: bug;
18
18
use rustc_middle:: mir:: mono:: CodegenUnit ;
19
- use rustc_middle:: ty:: layout:: { HasParamEnv , LayoutError , TyAndLayout } ;
19
+ use rustc_middle:: ty:: layout:: { HasParamEnv , LayoutError , LayoutOf , TyAndLayout } ;
20
20
use rustc_middle:: ty:: { self , Instance , Ty , TyCtxt } ;
21
21
use rustc_session:: config:: { CFGuard , CrateType , DebugInfo } ;
22
22
use rustc_session:: Session ;
23
23
use rustc_span:: source_map:: { Span , DUMMY_SP } ;
24
24
use 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 } ;
26
26
use rustc_target:: spec:: { HasTargetSpec , RelocModel , Target , TlsModel } ;
27
27
use smallvec:: SmallVec ;
28
28
@@ -836,14 +836,13 @@ impl ty::layout::HasTyCtxt<'tcx> for CodegenCx<'ll, 'tcx> {
836
836
}
837
837
838
838
impl LayoutOf < ' tcx > for CodegenCx < ' ll , ' tcx > {
839
- type Ty = Ty < ' tcx > ;
840
- type TyAndLayout = TyAndLayout < ' tcx > ;
839
+ type LayoutOfResult = TyAndLayout < ' tcx > ;
841
840
842
- fn layout_of ( & self , ty : Ty < ' tcx > ) -> Self :: TyAndLayout {
841
+ fn layout_of ( & self , ty : Ty < ' tcx > ) -> Self :: LayoutOfResult {
843
842
self . spanned_layout_of ( ty, DUMMY_SP )
844
843
}
845
844
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 {
847
846
self . tcx . layout_of ( ty:: ParamEnv :: reveal_all ( ) . and ( ty) ) . unwrap_or_else ( |e| {
848
847
if let LayoutError :: SizeOverflow ( _) = e {
849
848
self . sess ( ) . span_fatal ( span, & e. to_string ( ) )
0 commit comments