@@ -1136,29 +1136,28 @@ fn create_mono_items_for_default_impls<'tcx>(
1136
1136
1137
1137
/// Scans the miri alloc in order to find function calls, closures, and drop-glue.
1138
1138
fn 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) => {
1141
1141
let instance = Instance :: mono ( tcx, def_id) ;
1142
1142
if should_monomorphize_locally ( tcx, & instance) {
1143
1143
trace ! ( "collecting static {:?}" , def_id) ;
1144
1144
output. push ( MonoItem :: Static ( def_id) ) ;
1145
1145
}
1146
1146
}
1147
- Some ( GlobalAlloc :: Memory ( alloc) ) => {
1147
+ GlobalAlloc :: Memory ( alloc) => {
1148
1148
trace ! ( "collecting {:?} with {:#?}" , alloc_id, alloc) ;
1149
1149
for & ( ( ) , inner) in alloc. relocations ( ) . values ( ) {
1150
1150
rustc_data_structures:: stack:: ensure_sufficient_stack ( || {
1151
1151
collect_miri ( tcx, inner, output) ;
1152
1152
} ) ;
1153
1153
}
1154
1154
}
1155
- Some ( GlobalAlloc :: Function ( fn_instance) ) => {
1155
+ GlobalAlloc :: Function ( fn_instance) => {
1156
1156
if should_monomorphize_locally ( tcx, & fn_instance) {
1157
1157
trace ! ( "collecting {:?} with {:#?}" , alloc_id, fn_instance) ;
1158
1158
output. push ( create_fn_mono_item ( fn_instance) ) ;
1159
1159
}
1160
1160
}
1161
- None => bug ! ( "alloc id without corresponding allocation: {}" , alloc_id) ,
1162
1161
}
1163
1162
}
1164
1163
0 commit comments