diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-01-11 00:38:10 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-01-11 00:38:10 +0100 |
| commit | 4a647167e64c77c72a074c354543bbe9dacb2d96 (patch) | |
| tree | 898b2d08a22ad449d77666d8ff76250205392c75 | |
| parent | 51a73eb4fbbf2ec74c6a86942780fc2600811540 (diff) | |
| download | rust-4a647167e64c77c72a074c354543bbe9dacb2d96.tar.gz rust-4a647167e64c77c72a074c354543bbe9dacb2d96.zip | |
Add a comment
| -rw-r--r-- | src/librustc_mir/monomorphize/collector.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index e85e842031d..511a5fbc617 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/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))) |
