Skip to content

Commit 02f7de1

Browse files
committed
Fix lint findings in librustc_metadata
1 parent 6c272b7 commit 02f7de1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_metadata/encoder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
789789
ctor_vis = ty::Visibility::Restricted(DefId::local(CRATE_DEF_INDEX));
790790
}
791791

792-
let repr_options = get_repr_options(&tcx, adt_def_id);
792+
let repr_options = get_repr_options(tcx, adt_def_id);
793793

794794
Entry {
795795
kind: EntryKind::Struct(self.lazy(&data), repr_options),
@@ -1119,7 +1119,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
11191119
hir::ItemKind::GlobalAsm(..) => EntryKind::GlobalAsm,
11201120
hir::ItemKind::Ty(..) => EntryKind::Type,
11211121
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)),
11231123
hir::ItemKind::Struct(ref struct_def, _) => {
11241124
let variant = tcx.adt_def(def_id).non_enum_variant();
11251125

@@ -1129,7 +1129,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
11291129
let ctor = struct_def.ctor_hir_id()
11301130
.map(|ctor_hir_id| tcx.hir().local_def_id_from_hir_id(ctor_hir_id).index);
11311131

1132-
let repr_options = get_repr_options(&tcx, def_id);
1132+
let repr_options = get_repr_options(tcx, def_id);
11331133

11341134
EntryKind::Struct(self.lazy(&VariantData {
11351135
ctor_kind: variant.ctor_kind,
@@ -1140,7 +1140,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
11401140
}
11411141
hir::ItemKind::Union(..) => {
11421142
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);
11441144

11451145
EntryKind::Union(self.lazy(&VariantData {
11461146
ctor_kind: variant.ctor_kind,
@@ -1938,7 +1938,7 @@ pub fn encode_metadata<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
19381938
EncodedMetadata { raw_data: result }
19391939
}
19401940

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 {
19421942
let ty = tcx.type_of(did);
19431943
match ty.sty {
19441944
ty::Adt(ref def, _) => return def.repr,

0 commit comments

Comments
 (0)