We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4402286 commit 6110512Copy full SHA for 6110512
compiler/rustc_codegen_llvm/src/consts.rs
@@ -354,8 +354,6 @@ impl<'ll> CodegenCx<'ll, '_> {
354
};
355
let alloc = alloc.inner();
356
357
- let val_llty = self.val_ty(v);
358
-
359
let instance = Instance::mono(self.tcx, def_id);
360
let ty = instance.ty(self.tcx, ty::ParamEnv::reveal_all());
361
if !is_mutable {
@@ -366,6 +364,8 @@ impl<'ll> CodegenCx<'ll, '_> {
366
364
367
365
let g = self.get_static_inner(def_id, llty);
368
+ let val_llty = self.val_ty(v);
+
369
let g = if val_llty == llty {
370
g
371
} else {
0 commit comments