Remove some unnecessary &mut
s.
This commit is contained in:
parent
dc25fbe984
commit
0a1cd5baa4
1 changed files with 4 additions and 8 deletions
|
@ -136,7 +136,7 @@ struct PlacedRootMonoItems<'tcx> {
|
||||||
// The output CGUs are sorted by name.
|
// The output CGUs are sorted by name.
|
||||||
fn partition<'tcx, I>(
|
fn partition<'tcx, I>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
mono_items: &mut I,
|
mono_items: I,
|
||||||
max_cgu_count: usize,
|
max_cgu_count: usize,
|
||||||
usage_map: &UsageMap<'tcx>,
|
usage_map: &UsageMap<'tcx>,
|
||||||
) -> Vec<CodegenUnit<'tcx>>
|
) -> Vec<CodegenUnit<'tcx>>
|
||||||
|
@ -239,7 +239,7 @@ where
|
||||||
|
|
||||||
fn place_root_mono_items<'tcx, I>(
|
fn place_root_mono_items<'tcx, I>(
|
||||||
cx: &PartitioningCx<'_, 'tcx>,
|
cx: &PartitioningCx<'_, 'tcx>,
|
||||||
mono_items: &mut I,
|
mono_items: I,
|
||||||
) -> PlacedRootMonoItems<'tcx>
|
) -> PlacedRootMonoItems<'tcx>
|
||||||
where
|
where
|
||||||
I: Iterator<Item = MonoItem<'tcx>>,
|
I: Iterator<Item = MonoItem<'tcx>>,
|
||||||
|
@ -951,12 +951,8 @@ fn collect_and_partition_mono_items(tcx: TyCtxt<'_>, (): ()) -> (&DefIdSet, &[Co
|
||||||
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
|
let (codegen_units, _) = tcx.sess.time("partition_and_assert_distinct_symbols", || {
|
||||||
sync::join(
|
sync::join(
|
||||||
|| {
|
|| {
|
||||||
let mut codegen_units = partition(
|
let mut codegen_units =
|
||||||
tcx,
|
partition(tcx, items.iter().copied(), tcx.sess.codegen_units(), &usage_map);
|
||||||
&mut items.iter().copied(),
|
|
||||||
tcx.sess.codegen_units(),
|
|
||||||
&usage_map,
|
|
||||||
);
|
|
||||||
codegen_units[0].make_primary();
|
codegen_units[0].make_primary();
|
||||||
&*tcx.arena.alloc_from_iter(codegen_units)
|
&*tcx.arena.alloc_from_iter(codegen_units)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue