We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
internalize_symbols
1 parent 9fd6d97 commit 392045bCopy full SHA for 392045b
compiler/rustc_monomorphize/src/partitioning.rs
@@ -491,11 +491,14 @@ fn internalize_symbols<'tcx>(
491
// can internalize all candidates, since there is nowhere else they
492
// could be used from.
493
for cgu in codegen_units {
494
- for candidate in &internalization_candidates {
495
- cgu.items_mut().insert(*candidate, (Linkage::Internal, Visibility::Default));
+ for (item, linkage_and_visibility) in cgu.items_mut() {
+ if !internalization_candidates.contains(item) {
496
+ // This item is no candidate for internalizing, so skip it.
497
+ continue;
498
+ }
499
+ *linkage_and_visibility = (Linkage::Internal, Visibility::Default);
500
}
501
-
502
return;
503
504
0 commit comments