]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/mono_item.rs
Rollup merge of #68145 - JohnTitor:pub-check-lint-name-result, r=Centril
[rust.git] / src / librustc_codegen_llvm / mono_item.rs
index c7b5c5e3db6a9b54d2417b664364ef892b94f578..97393e69e995fcb52830bc6d1ec4ceffbb27cd20 100644 (file)
@@ -22,7 +22,7 @@ fn predefine_static(
         symbol_name: &str,
     ) {
         let instance = Instance::mono(self.tcx, def_id);
-        let ty = instance.ty(self.tcx);
+        let ty = instance.monomorphic_ty(self.tcx);
         let llty = self.layout_of(ty).llvm_type(self);
 
         let g = self.define_global(symbol_name, llty).unwrap_or_else(|| {