Skip to content

Commit b55a642

Browse files
committed
Polymorphization is gone
1 parent 25bc709 commit b55a642

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/monomorphize_collector.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -785,12 +785,7 @@ pub fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>
785785
return true;
786786
}
787787

788-
if tcx.is_reachable_non_generic(def_id)
789-
|| instance
790-
.polymorphize(tcx)
791-
.upstream_monomorphization(tcx)
792-
.is_some()
793-
{
788+
if tcx.is_reachable_non_generic(def_id) || instance.upstream_monomorphization(tcx).is_some() {
794789
// We can link to the item in question, no instance needed in this crate.
795790
return false;
796791
}
@@ -926,7 +921,7 @@ fn create_fn_mono_item<'tcx>(
926921
instance: Instance<'tcx>,
927922
source: Span,
928923
) -> Spanned<MonoItem<'tcx>> {
929-
respan(source, MonoItem::Fn(instance.polymorphize(tcx)))
924+
respan(source, MonoItem::Fn(instance))
930925
}
931926

932927
/// Creates a `MonoItem` for each method that is referenced by the vtable for

0 commit comments

Comments
 (0)