]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/consts.rs
Rollup merge of #68767 - kubo39:patch-macos, r=shepmaster
[rust.git] / src / librustc_codegen_llvm / consts.rs
index 88850e19d8f9fced3662f8ef9c072b47102652ab..38090cb26bc413e114e6d21285d57787f7d60ddb 100644 (file)
@@ -205,7 +205,7 @@ impl CodegenCx<'ll, 'tcx> {
             def_id
         );
 
-        let ty = instance.ty(self.tcx);
+        let ty = instance.monomorphic_ty(self.tcx);
         let sym = self.tcx.symbol_name(instance).name;
 
         debug!("get_static: sym={} instance={:?}", sym, instance);
@@ -362,7 +362,7 @@ fn codegen_static(&self, def_id: DefId, is_mutable: bool) {
             };
 
             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 = if val_llty == llty {
                 g