@@ -1136,29 +1136,28 @@ fn create_mono_items_for_default_impls<'tcx>(
11361136
11371137/// Scans the miri alloc in order to find function calls, closures, and drop-glue.
11381138fn collect_miri < ' tcx > ( tcx : TyCtxt < ' tcx > , alloc_id : AllocId , output : & mut Vec < MonoItem < ' tcx > > ) {
1139- match tcx. get_global_alloc ( alloc_id) {
1140- Some ( GlobalAlloc :: Static ( def_id) ) => {
1139+ match tcx. global_alloc ( alloc_id) {
1140+ GlobalAlloc :: Static ( def_id) => {
11411141 let instance = Instance :: mono ( tcx, def_id) ;
11421142 if should_monomorphize_locally ( tcx, & instance) {
11431143 trace ! ( "collecting static {:?}" , def_id) ;
11441144 output. push ( MonoItem :: Static ( def_id) ) ;
11451145 }
11461146 }
1147- Some ( GlobalAlloc :: Memory ( alloc) ) => {
1147+ GlobalAlloc :: Memory ( alloc) => {
11481148 trace ! ( "collecting {:?} with {:#?}" , alloc_id, alloc) ;
11491149 for & ( ( ) , inner) in alloc. relocations ( ) . values ( ) {
11501150 rustc_data_structures:: stack:: ensure_sufficient_stack ( || {
11511151 collect_miri ( tcx, inner, output) ;
11521152 } ) ;
11531153 }
11541154 }
1155- Some ( GlobalAlloc :: Function ( fn_instance) ) => {
1155+ GlobalAlloc :: Function ( fn_instance) => {
11561156 if should_monomorphize_locally ( tcx, & fn_instance) {
11571157 trace ! ( "collecting {:?} with {:#?}" , alloc_id, fn_instance) ;
11581158 output. push ( create_fn_mono_item ( fn_instance) ) ;
11591159 }
11601160 }
1161- None => bug ! ( "alloc id without corresponding allocation: {}" , alloc_id) ,
11621161 }
11631162}
11641163
0 commit comments