@@ -384,7 +384,7 @@ fn collect_items_rec<'tcx>(
384384
385385 if let Ok ( alloc) = tcx. eval_static_initializer ( def_id) {
386386 for & id in alloc. inner ( ) . provenance ( ) . ptrs ( ) . values ( ) {
387- collect_miri ( tcx, id, & mut used_items) ;
387+ collect_alloc ( tcx, id, & mut used_items) ;
388388 }
389389 }
390390
@@ -1331,8 +1331,8 @@ fn create_mono_items_for_default_impls<'tcx>(
13311331 }
13321332}
13331333
1334- /// Scans the miri alloc in order to find function calls, closures, and drop-glue.
1335- fn collect_miri < ' tcx > ( tcx : TyCtxt < ' tcx > , alloc_id : AllocId , output : & mut MonoItems < ' tcx > ) {
1334+ /// Scans the CTFE alloc in order to find function calls, closures, and drop-glue.
1335+ fn collect_alloc < ' tcx > ( tcx : TyCtxt < ' tcx > , alloc_id : AllocId , output : & mut MonoItems < ' tcx > ) {
13361336 match tcx. global_alloc ( alloc_id) {
13371337 GlobalAlloc :: Static ( def_id) => {
13381338 assert ! ( !tcx. is_thread_local_static( def_id) ) ;
@@ -1346,7 +1346,7 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte
13461346 trace ! ( "collecting {:?} with {:#?}" , alloc_id, alloc) ;
13471347 for & inner in alloc. inner ( ) . provenance ( ) . ptrs ( ) . values ( ) {
13481348 rustc_data_structures:: stack:: ensure_sufficient_stack ( || {
1349- collect_miri ( tcx, inner, output) ;
1349+ collect_alloc ( tcx, inner, output) ;
13501350 } ) ;
13511351 }
13521352 }
@@ -1358,7 +1358,7 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte
13581358 }
13591359 GlobalAlloc :: VTable ( ty, trait_ref) => {
13601360 let alloc_id = tcx. vtable_allocation ( ( ty, trait_ref) ) ;
1361- collect_miri ( tcx, alloc_id, output)
1361+ collect_alloc ( tcx, alloc_id, output)
13621362 }
13631363 }
13641364}
@@ -1381,10 +1381,10 @@ fn collect_const_value<'tcx>(
13811381 output : & mut MonoItems < ' tcx > ,
13821382) {
13831383 match value {
1384- ConstValue :: Scalar ( Scalar :: Ptr ( ptr, _size) ) => collect_miri ( tcx, ptr. provenance , output) ,
1384+ ConstValue :: Scalar ( Scalar :: Ptr ( ptr, _size) ) => collect_alloc ( tcx, ptr. provenance , output) ,
13851385 ConstValue :: Slice { data : alloc, start : _, end : _ } | ConstValue :: ByRef { alloc, .. } => {
13861386 for & id in alloc. inner ( ) . provenance ( ) . ptrs ( ) . values ( ) {
1387- collect_miri ( tcx, id, output) ;
1387+ collect_alloc ( tcx, id, output) ;
13881388 }
13891389 }
13901390 _ => { }
0 commit comments