Don't attempt to polymorphize statics

Fixes rust-lang/rust#124319
This commit is contained in:
bjorn3 2024-05-11 16:36:12 +00:00
parent f437815d91
commit 8cf40c46b2

View File

@ -258,7 +258,7 @@ fn data_id_for_static(
) -> DataId {
let attrs = tcx.codegen_fn_attrs(def_id);
let instance = Instance::mono(tcx, def_id).polymorphize(tcx);
let instance = Instance::mono(tcx, def_id);
let symbol_name = tcx.symbol_name(instance).name;
if let Some(import_linkage) = attrs.import_linkage {