File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -354,18 +354,11 @@ impl<'ll> CodegenCx<'ll, '_> {
354
354
} ;
355
355
let alloc = alloc. inner ( ) ;
356
356
357
- let instance = Instance :: mono ( self . tcx , def_id) ;
358
- let ty = instance. ty ( self . tcx , ty:: ParamEnv :: reveal_all ( ) ) ;
359
- if !self . tcx . is_mutable_static ( def_id) {
360
- debug_assert_eq ! ( alloc. mutability. is_not( ) , self . type_is_freeze( ty) ) ;
361
- }
362
- debug_assert_eq ! ( alloc. align, self . align_of( ty) ) ;
363
- let llty = self . layout_of ( ty) . llvm_type ( self ) ;
364
-
365
- let g = self . get_static_inner ( def_id, llty) ;
366
-
367
357
let val_llty = self . val_ty ( v) ;
368
358
359
+ let g = self . get_static_inner ( def_id, val_llty) ;
360
+ let llty = self . val_ty ( g) ;
361
+
369
362
let g = if val_llty == llty {
370
363
g
371
364
} else {
You can’t perform that action at this time.
0 commit comments