@@ -789,7 +789,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
789
789
ctor_vis = ty:: Visibility :: Restricted ( DefId :: local ( CRATE_DEF_INDEX ) ) ;
790
790
}
791
791
792
- let repr_options = get_repr_options ( & tcx, adt_def_id) ;
792
+ let repr_options = get_repr_options ( tcx, adt_def_id) ;
793
793
794
794
Entry {
795
795
kind : EntryKind :: Struct ( self . lazy ( & data) , repr_options) ,
@@ -1119,7 +1119,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
1119
1119
hir:: ItemKind :: GlobalAsm ( ..) => EntryKind :: GlobalAsm ,
1120
1120
hir:: ItemKind :: Ty ( ..) => EntryKind :: Type ,
1121
1121
hir:: ItemKind :: Existential ( ..) => EntryKind :: Existential ,
1122
- hir:: ItemKind :: Enum ( ..) => EntryKind :: Enum ( get_repr_options ( & tcx, def_id) ) ,
1122
+ hir:: ItemKind :: Enum ( ..) => EntryKind :: Enum ( get_repr_options ( tcx, def_id) ) ,
1123
1123
hir:: ItemKind :: Struct ( ref struct_def, _) => {
1124
1124
let variant = tcx. adt_def ( def_id) . non_enum_variant ( ) ;
1125
1125
@@ -1129,7 +1129,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
1129
1129
let ctor = struct_def. ctor_hir_id ( )
1130
1130
. map ( |ctor_hir_id| tcx. hir ( ) . local_def_id_from_hir_id ( ctor_hir_id) . index ) ;
1131
1131
1132
- let repr_options = get_repr_options ( & tcx, def_id) ;
1132
+ let repr_options = get_repr_options ( tcx, def_id) ;
1133
1133
1134
1134
EntryKind :: Struct ( self . lazy ( & VariantData {
1135
1135
ctor_kind : variant. ctor_kind ,
@@ -1140,7 +1140,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
1140
1140
}
1141
1141
hir:: ItemKind :: Union ( ..) => {
1142
1142
let variant = tcx. adt_def ( def_id) . non_enum_variant ( ) ;
1143
- let repr_options = get_repr_options ( & tcx, def_id) ;
1143
+ let repr_options = get_repr_options ( tcx, def_id) ;
1144
1144
1145
1145
EntryKind :: Union ( self . lazy ( & VariantData {
1146
1146
ctor_kind : variant. ctor_kind ,
@@ -1938,7 +1938,7 @@ pub fn encode_metadata<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
1938
1938
EncodedMetadata { raw_data : result }
1939
1939
}
1940
1940
1941
- pub fn get_repr_options < ' a , ' tcx , ' gcx > ( tcx : & TyCtxt < ' a , ' tcx , ' gcx > , did : DefId ) -> ReprOptions {
1941
+ pub fn get_repr_options < ' a , ' tcx , ' gcx > ( tcx : TyCtxt < ' a , ' tcx , ' gcx > , did : DefId ) -> ReprOptions {
1942
1942
let ty = tcx. type_of ( did) ;
1943
1943
match ty. sty {
1944
1944
ty:: Adt ( ref def, _) => return def. repr ,
0 commit comments