Skip to content

Commit 6110512

Browse files
committed
Swap the order of a piece of code to make follow up diffs simpler
1 parent 4402286 commit 6110512

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,6 @@ impl<'ll> CodegenCx<'ll, '_> {
354354
};
355355
let alloc = alloc.inner();
356356

357-
let val_llty = self.val_ty(v);
358-
359357
let instance = Instance::mono(self.tcx, def_id);
360358
let ty = instance.ty(self.tcx, ty::ParamEnv::reveal_all());
361359
if !is_mutable {
@@ -366,6 +364,8 @@ impl<'ll> CodegenCx<'ll, '_> {
366364

367365
let g = self.get_static_inner(def_id, llty);
368366

367+
let val_llty = self.val_ty(v);
368+
369369
let g = if val_llty == llty {
370370
g
371371
} else {

0 commit comments

Comments
 (0)