Skip to content
Permalink
Browse files

Add a comment

  • Loading branch information
Zoxc committed Jan 10, 2020
1 parent 51a73eb commit 4a647167e64c77c72a074c354543bbe9dacb2d96
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/librustc_mir/monomorphize/collector.rs
@@ -398,6 +398,9 @@ fn record_accesses<'tcx>(
mono_item.instantiation_mode(tcx) == InstantiationMode::LocalCopy
};

// We collect this into a `SmallVec` to avoid calling `is_inlining_candidate` in the lock.
// FIXME: Call `is_inlining_candidate` when pushing to `neighbors` in `collect_items_rec`
// instead to avoid creating this `SmallVec`.
let accesses: SmallVec<[_; 128]> = callees
.into_iter()
.map(|mono_item| (*mono_item, is_inlining_candidate(mono_item)))

0 comments on commit 4a64716

Please sign in to comment.
You can’t perform that action at this time.