@@ -155,7 +155,7 @@ pub(crate) fn codegen_const_value<'tcx>(
155155 fx. bcx . ins ( ) . global_value ( fx. pointer_type , local_data_id)
156156 }
157157 }
158- GlobalAlloc :: Function ( instance) => {
158+ GlobalAlloc :: Function { instance, .. } => {
159159 let func_id = crate :: abi:: import_function ( fx. tcx , fx. module , instance) ;
160160 let local_func_id =
161161 fx. module . declare_func_in_func ( func_id, & mut fx. bcx . func ) ;
@@ -351,7 +351,9 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
351351 TodoItem :: Alloc ( alloc_id) => {
352352 let alloc = match tcx. global_alloc ( alloc_id) {
353353 GlobalAlloc :: Memory ( alloc) => alloc,
354- GlobalAlloc :: Function ( _) | GlobalAlloc :: Static ( _) | GlobalAlloc :: VTable ( ..) => {
354+ GlobalAlloc :: Function { .. }
355+ | GlobalAlloc :: Static ( _)
356+ | GlobalAlloc :: VTable ( ..) => {
355357 unreachable ! ( )
356358 }
357359 } ;
@@ -415,7 +417,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
415417
416418 let reloc_target_alloc = tcx. global_alloc ( alloc_id) ;
417419 let data_id = match reloc_target_alloc {
418- GlobalAlloc :: Function ( instance) => {
420+ GlobalAlloc :: Function { instance, .. } => {
419421 assert_eq ! ( addend, 0 ) ;
420422 let func_id =
421423 crate :: abi:: import_function ( tcx, module, instance. polymorphize ( tcx) ) ;
0 commit comments