From 8cf40c46b20d5b3e2f9ce3d4c82fcbcf5c4dec40 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 11 May 2024 16:36:12 +0000 Subject: [PATCH] Don't attempt to polymorphize statics Fixes rust-lang/rust#124319 --- src/constant.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constant.rs b/src/constant.rs index cdf499a22f8..64e83e43d32 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -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 {