@@ -32,11 +32,11 @@ pub trait IntegerExt {
3232 fn to_ty < ' a , ' tcx > ( & self , tcx : TyCtxt < ' a , ' tcx , ' tcx > , signed : bool ) -> Ty < ' tcx > ;
3333 fn from_attr < C : HasDataLayout > ( cx : C , ity : attr:: IntType ) -> Integer ;
3434 fn repr_discr < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
35- ty : Ty < ' tcx > ,
36- repr : & ReprOptions ,
37- min : i128 ,
38- max : i128 )
39- -> ( Integer , bool ) ;
35+ ty : Ty < ' tcx > ,
36+ repr : & ReprOptions ,
37+ min : i128 ,
38+ max : i128 )
39+ -> ( Integer , bool ) ;
4040}
4141
4242impl IntegerExt for Integer {
@@ -76,11 +76,11 @@ impl IntegerExt for Integer {
7676 /// N.B.: u128 values above i128::MAX will be treated as signed, but
7777 /// that shouldn't affect anything, other than maybe debuginfo.
7878 fn repr_discr < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
79- ty : Ty < ' tcx > ,
80- repr : & ReprOptions ,
81- min : i128 ,
82- max : i128 )
83- -> ( Integer , bool ) {
79+ ty : Ty < ' tcx > ,
80+ repr : & ReprOptions ,
81+ min : i128 ,
82+ max : i128 )
83+ -> ( Integer , bool ) {
8484 // Theoretically, negative values could be larger in unsigned representation
8585 // than the unsigned representation of the signed minimum. However, if there
8686 // are any negative values, the only valid unsigned representation is u128
@@ -96,7 +96,7 @@ impl IntegerExt for Integer {
9696 let fit = if ity. is_signed ( ) { signed_fit } else { unsigned_fit } ;
9797 if discr < fit {
9898 bug ! ( "Integer::repr_discr: `#[repr]` hint too small for \
99- discriminant range of enum `{}", ty)
99+ discriminant range of enum `{}", ty)
100100 }
101101 return ( discr, ity. is_signed ( ) ) ;
102102 }
@@ -106,7 +106,7 @@ impl IntegerExt for Integer {
106106 // WARNING: the ARM EABI has two variants; the one corresponding
107107 // to `at_least == I32` appears to be used on Linux and NetBSD,
108108 // but some systems may use the variant corresponding to no
109- // lower bound. However, we don't run on those yet...?
109+ // lower bound. However, we don't run on those yet...?
110110 "arm" => min_from_extern = Some ( I32 ) ,
111111 _ => min_from_extern = Some ( I32 ) ,
112112 }
@@ -250,6 +250,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
250250 /// A univariant, but with a prefix of an arbitrary size & alignment (e.g. enum tag).
251251 Prefixed ( Size , Align ) ,
252252 }
253+
253254 let univariant_uninterned = |fields : & [ TyLayout < ' _ > ] , repr : & ReprOptions , kind| {
254255 let packed = repr. packed ( ) ;
255256 if packed && repr. align > 0 {
@@ -324,7 +325,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
324325 let field = fields[ i as usize ] ;
325326 if !sized {
326327 bug ! ( "univariant: field #{} of `{}` comes after unsized field" ,
327- offsets. len( ) , ty) ;
328+ offsets. len( ) , ty) ;
328329 }
329330
330331 if field. is_unsized ( ) {
@@ -628,7 +629,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
628629 } ;
629630
630631 univariant ( & tys. iter ( ) . map ( |ty| self . layout_of ( ty) ) . collect :: < Result < Vec < _ > , _ > > ( ) ?,
631- & ReprOptions :: default ( ) , kind) ?
632+ & ReprOptions :: default ( ) , kind) ?
632633 }
633634
634635 // SIMD vector types.
@@ -640,7 +641,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
640641 Abi :: Scalar ( ref scalar) => scalar. clone ( ) ,
641642 _ => {
642643 tcx. sess . fatal ( & format ! ( "monomorphising SIMD type `{}` with \
643- a non-machine element type `{}`",
644+ a non-machine element type `{}`",
644645 ty, element. ty) ) ;
645646 }
646647 } ;
@@ -743,7 +744,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
743744 // Only one variant is present.
744745 ( present_second. is_none ( ) &&
745746 // Representation optimizations are allowed.
746- !def. repr . inhibit_enum_layout_opt ( ) ) ;
747+ !def. repr . inhibit_enum_layout_opt ( ) ) ;
747748 if is_struct {
748749 // Struct, or univariant enum equivalent to a struct.
749750 // (Typechecking will reject discriminant-sizing attrs.)
@@ -755,7 +756,7 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
755756 let param_env = tcx. param_env ( def. did ) ;
756757 let last_field = def. variants [ v] . fields . last ( ) . unwrap ( ) ;
757758 let always_sized = tcx. type_of ( last_field. did )
758- . is_sized ( tcx. at ( DUMMY_SP ) , param_env) ;
759+ . is_sized ( tcx. at ( DUMMY_SP ) , param_env) ;
759760 if !always_sized { StructKind :: MaybeUnsized }
760761 else { StructKind :: AlwaysSized }
761762 } ;
@@ -1258,8 +1259,8 @@ impl<'a, 'tcx> LayoutCx<'tcx, TyCtxt<'a, 'tcx, 'tcx>> {
12581259 let fields: Vec < _ > =
12591260 variant_def. fields . iter ( ) . map ( |f| f. ident . name ) . collect ( ) ;
12601261 build_variant_info ( Some ( variant_def. name ) ,
1261- & fields,
1262- layout. for_variant ( self , i) )
1262+ & fields,
1263+ layout. for_variant ( self , i) )
12631264 } )
12641265 . collect ( ) ;
12651266 record ( adt_kind. into ( ) , adt_packed, match layout. variants {
0 commit comments