Skip to content

Commit 9b18ada

Browse files
committed
Fix nightly compilation
1 parent 551d4ab commit 9b18ada

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/monomorphize_collector.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ fn collect_roots(tcx: TyCtxt<'_>, mode: MonoItemCollectionMode) -> Vec<MonoItem<
171171

172172
let crate_items = tcx.hir_crate_items(());
173173

174-
for id in crate_items.items() {
174+
for id in crate_items.free_items() {
175175
collector.process_item(id);
176176
}
177177

@@ -858,10 +858,8 @@ pub fn find_vtable_types_for_unsizing<'tcx>(
858858
};
859859

860860
match (&source_ty.kind(), &target_ty.kind()) {
861-
(&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(ty::TypeAndMut { ty: b, .. }))
862-
| (&ty::RawPtr(ty::TypeAndMut { ty: a, .. }), &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) => {
863-
ptr_vtable(*a, *b)
864-
}
861+
(&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(b, _))
862+
| (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => ptr_vtable(*a, *b),
865863
(&ty::Adt(def_a, _), &ty::Adt(def_b, _)) if def_a.is_box() && def_b.is_box() => {
866864
ptr_vtable(source_ty.boxed_ty(), target_ty.boxed_ty())
867865
}

0 commit comments

Comments
 (0)