File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- use rustc_target:: abi:: { Align , Size } ;
1
+ use rustc_target:: abi:: { MemoryPosition , Size } ;
2
2
use rustc_data_structures:: fx:: { FxHashSet } ;
3
3
use std:: cmp:: { self , Ordering } ;
4
4
use rustc_data_structures:: sync:: Lock ;
@@ -54,8 +54,7 @@ impl CodeStats {
54
54
pub fn record_type_size < S : ToString > ( & self ,
55
55
kind : DataTypeKind ,
56
56
type_desc : S ,
57
- align : Align ,
58
- overall_size : Size ,
57
+ mem_pos : MemoryPosition ,
59
58
packed : bool ,
60
59
opt_discr_size : Option < Size > ,
61
60
mut variants : Vec < VariantInfo > ) {
@@ -68,8 +67,8 @@ impl CodeStats {
68
67
let info = TypeSizeInfo {
69
68
kind,
70
69
type_description : type_desc. to_string ( ) ,
71
- align : align. bytes ( ) ,
72
- overall_size : overall_size . bytes ( ) ,
70
+ align : mem_pos . align . bytes ( ) ,
71
+ overall_size : mem_pos . size . bytes ( ) ,
73
72
packed : packed,
74
73
opt_discr_size : opt_discr_size. map ( |s| s. bytes ( ) ) ,
75
74
variants,
Original file line number Diff line number Diff line change @@ -1612,8 +1612,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
1612
1612
let type_desc = format ! ( "{:?}" , layout. ty) ;
1613
1613
self . tcx . sess . code_stats . record_type_size ( kind,
1614
1614
type_desc,
1615
- layout. pref_pos . align . abi ,
1616
- layout. pref_pos . size ,
1615
+ layout. pref_pos . mem_pos ( ) ,
1617
1616
packed,
1618
1617
opt_discr_size,
1619
1618
variants) ;
You can’t perform that action at this time.
0 commit comments