1
- use crate :: session:: { self , DataTypeKind } ;
1
+ use crate :: ich:: StableHashingContext ;
2
+ use crate :: mir:: { GeneratorLayout , GeneratorSavedLocal } ;
3
+ use crate :: ty:: subst:: Subst ;
2
4
use crate :: ty:: { self , subst:: SubstsRef , ReprOptions , Ty , TyCtxt , TypeFoldable } ;
3
5
4
6
use rustc_ast:: ast:: { self , Ident , IntTy , UintTy } ;
5
7
use rustc_attr as attr;
6
- use rustc_span:: DUMMY_SP ;
7
-
8
- use std:: cmp;
9
- use std:: fmt;
10
- use std:: iter;
11
- use std:: mem;
12
- use std:: ops:: Bound ;
13
-
14
- use crate :: ich:: StableHashingContext ;
15
- use crate :: mir:: { GeneratorLayout , GeneratorSavedLocal } ;
16
- use crate :: ty:: subst:: Subst ;
17
8
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
18
9
use rustc_hir as hir;
19
10
use rustc_index:: bit_set:: BitSet ;
20
11
use rustc_index:: vec:: { Idx , IndexVec } ;
21
-
12
+ use rustc_session:: { DataTypeKind , FieldInfo , SizeKind , VariantInfo } ;
13
+ use rustc_span:: DUMMY_SP ;
22
14
use rustc_target:: abi:: call:: {
23
15
ArgAbi , ArgAttribute , ArgAttributes , Conv , FnAbi , PassMode , Reg , RegKind ,
24
16
} ;
25
17
pub use rustc_target:: abi:: * ;
26
18
use rustc_target:: spec:: { abi:: Abi as SpecAbi , HasTargetSpec } ;
27
19
20
+ use std:: cmp;
21
+ use std:: fmt;
22
+ use std:: iter;
23
+ use std:: mem;
24
+ use std:: ops:: Bound ;
25
+
28
26
pub trait IntegerExt {
29
27
fn to_ty < ' tcx > ( & self , tcx : TyCtxt < ' tcx > , signed : bool ) -> Ty < ' tcx > ;
30
28
fn from_attr < C : HasDataLayout > ( cx : & C , ity : attr:: IntType ) -> Integer ;
@@ -1648,7 +1646,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
1648
1646
if min_size < field_end {
1649
1647
min_size = field_end;
1650
1648
}
1651
- session :: FieldInfo {
1649
+ FieldInfo {
1652
1650
name : name. to_string ( ) ,
1653
1651
offset : offset. bytes ( ) ,
1654
1652
size : field_layout. size . bytes ( ) ,
@@ -1658,13 +1656,9 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
1658
1656
} )
1659
1657
. collect ( ) ;
1660
1658
1661
- session :: VariantInfo {
1659
+ VariantInfo {
1662
1660
name : n. map ( |n| n. to_string ( ) ) ,
1663
- kind : if layout. is_unsized ( ) {
1664
- session:: SizeKind :: Min
1665
- } else {
1666
- session:: SizeKind :: Exact
1667
- } ,
1661
+ kind : if layout. is_unsized ( ) { SizeKind :: Min } else { SizeKind :: Exact } ,
1668
1662
align : layout. align . abi . bytes ( ) ,
1669
1663
size : if min_size. bytes ( ) == 0 { layout. size . bytes ( ) } else { min_size. bytes ( ) } ,
1670
1664
fields : field_info,
0 commit comments