@@ -6,7 +6,7 @@ use base_db::ra_salsa::Cycle;
6
6
use chalk_ir:: { AdtId , FloatTy , IntTy , TyKind , UintTy } ;
7
7
use hir_def:: {
8
8
layout:: {
9
- Abi , FieldsShape , Float , Integer , LayoutCalculator , LayoutCalculatorError , LayoutS ,
9
+ IrForm , FieldsShape , Float , Integer , LayoutCalculator , LayoutCalculatorError , LayoutS ,
10
10
Primitive , ReprOptions , Scalar , Size , StructKind , TargetDataLayout , WrappingRange ,
11
11
} ,
12
12
LocalFieldId , StructId ,
@@ -168,7 +168,7 @@ fn layout_of_simd_ty(
168
168
169
169
// Compute the ABI of the element type:
170
170
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 {
172
172
return Err ( LayoutError :: Unknown ) ;
173
173
} ;
174
174
@@ -190,7 +190,7 @@ fn layout_of_simd_ty(
190
190
Ok ( Arc :: new ( Layout {
191
191
variants : Variants :: Single { index : struct_variant_idx ( ) } ,
192
192
fields,
193
- abi : Abi :: Vector { element : e_abi, count : e_len } ,
193
+ ir_form : IrForm :: Vector { element : e_abi, count : e_len } ,
194
194
largest_niche : e_ly. largest_niche ,
195
195
size,
196
196
align,
@@ -294,18 +294,18 @@ pub fn layout_of_ty_query(
294
294
. checked_mul ( count, dl)
295
295
. ok_or ( LayoutError :: BadCalc ( LayoutCalculatorError :: SizeOverflow ) ) ?;
296
296
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
299
299
} else {
300
- Abi :: Aggregate { sized : true }
300
+ IrForm :: Memory { sized : true }
301
301
} ;
302
302
303
303
let largest_niche = if count != 0 { element. largest_niche } else { None } ;
304
304
305
305
Layout {
306
306
variants : Variants :: Single { index : struct_variant_idx ( ) } ,
307
307
fields : FieldsShape :: Array { stride : element. size , count } ,
308
- abi ,
308
+ ir_form ,
309
309
largest_niche,
310
310
align : element. align ,
311
311
size,
@@ -318,7 +318,7 @@ pub fn layout_of_ty_query(
318
318
Layout {
319
319
variants : Variants :: Single { index : struct_variant_idx ( ) } ,
320
320
fields : FieldsShape :: Array { stride : element. size , count : 0 } ,
321
- abi : Abi :: Aggregate { sized : false } ,
321
+ ir_form : IrForm :: Memory { sized : false } ,
322
322
largest_niche : None ,
323
323
align : element. align ,
324
324
size : Size :: ZERO ,
@@ -329,7 +329,7 @@ pub fn layout_of_ty_query(
329
329
TyKind :: Str => Layout {
330
330
variants : Variants :: Single { index : struct_variant_idx ( ) } ,
331
331
fields : FieldsShape :: Array { stride : Size :: from_bytes ( 1 ) , count : 0 } ,
332
- abi : Abi :: Aggregate { sized : false } ,
332
+ ir_form : IrForm :: Memory { sized : false } ,
333
333
largest_niche : None ,
334
334
align : dl. i8_align ,
335
335
size : Size :: ZERO ,
@@ -379,8 +379,8 @@ pub fn layout_of_ty_query(
379
379
TyKind :: Never => cx. calc . layout_of_never_type ( ) ,
380
380
TyKind :: Dyn ( _) | TyKind :: Foreign ( _) => {
381
381
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 ,
384
384
_ => return Err ( LayoutError :: Unknown ) ,
385
385
}
386
386
unit
0 commit comments