@@ -6,7 +6,7 @@ use base_db::ra_salsa::Cycle;
66use chalk_ir:: { AdtId , FloatTy , IntTy , TyKind , UintTy } ;
77use hir_def:: {
88 layout:: {
9- Abi , FieldsShape , Float , Integer , LayoutCalculator , LayoutCalculatorError , LayoutS ,
9+ IrForm , FieldsShape , Float , Integer , LayoutCalculator , LayoutCalculatorError , LayoutS ,
1010 Primitive , ReprOptions , Scalar , Size , StructKind , TargetDataLayout , WrappingRange ,
1111 } ,
1212 LocalFieldId , StructId ,
@@ -168,7 +168,7 @@ fn layout_of_simd_ty(
168168
169169 // Compute the ABI of the element type:
170170 let e_ly = db. layout_of_ty ( e_ty, env) ?;
171- let Abi :: Scalar ( e_abi) = e_ly. abi else {
171+ let IrForm :: Scalar ( e_abi) = e_ly. ir_form else {
172172 return Err ( LayoutError :: Unknown ) ;
173173 } ;
174174
@@ -190,7 +190,7 @@ fn layout_of_simd_ty(
190190 Ok ( Arc :: new ( Layout {
191191 variants : Variants :: Single { index : struct_variant_idx ( ) } ,
192192 fields,
193- abi : Abi :: Vector { element : e_abi, count : e_len } ,
193+ ir_form : IrForm :: Vector { element : e_abi, count : e_len } ,
194194 largest_niche : e_ly. largest_niche ,
195195 size,
196196 align,
@@ -294,18 +294,18 @@ pub fn layout_of_ty_query(
294294 . checked_mul ( count, dl)
295295 . ok_or ( LayoutError :: BadCalc ( LayoutCalculatorError :: SizeOverflow ) ) ?;
296296
297- let abi = if count != 0 && matches ! ( element. abi , Abi :: Uninhabited ) {
298- Abi :: Uninhabited
297+ let ir_form = if count != 0 && matches ! ( element. ir_form , IrForm :: Uninhabited ) {
298+ IrForm :: Uninhabited
299299 } else {
300- Abi :: Aggregate { sized : true }
300+ IrForm :: Memory { sized : true }
301301 } ;
302302
303303 let largest_niche = if count != 0 { element. largest_niche } else { None } ;
304304
305305 Layout {
306306 variants : Variants :: Single { index : struct_variant_idx ( ) } ,
307307 fields : FieldsShape :: Array { stride : element. size , count } ,
308- abi ,
308+ ir_form ,
309309 largest_niche,
310310 align : element. align ,
311311 size,
@@ -318,7 +318,7 @@ pub fn layout_of_ty_query(
318318 Layout {
319319 variants : Variants :: Single { index : struct_variant_idx ( ) } ,
320320 fields : FieldsShape :: Array { stride : element. size , count : 0 } ,
321- abi : Abi :: Aggregate { sized : false } ,
321+ ir_form : IrForm :: Memory { sized : false } ,
322322 largest_niche : None ,
323323 align : element. align ,
324324 size : Size :: ZERO ,
@@ -329,7 +329,7 @@ pub fn layout_of_ty_query(
329329 TyKind :: Str => Layout {
330330 variants : Variants :: Single { index : struct_variant_idx ( ) } ,
331331 fields : FieldsShape :: Array { stride : Size :: from_bytes ( 1 ) , count : 0 } ,
332- abi : Abi :: Aggregate { sized : false } ,
332+ ir_form : IrForm :: Memory { sized : false } ,
333333 largest_niche : None ,
334334 align : dl. i8_align ,
335335 size : Size :: ZERO ,
@@ -379,8 +379,8 @@ pub fn layout_of_ty_query(
379379 TyKind :: Never => cx. calc . layout_of_never_type ( ) ,
380380 TyKind :: Dyn ( _) | TyKind :: Foreign ( _) => {
381381 let mut unit = layout_of_unit ( & cx) ?;
382- match & mut unit. abi {
383- Abi :: Aggregate { sized } => * sized = false ,
382+ match & mut unit. ir_form {
383+ IrForm :: Memory { sized } => * sized = false ,
384384 _ => return Err ( LayoutError :: Unknown ) ,
385385 }
386386 unit
0 commit comments