@@ -209,7 +209,7 @@ use std::path::PathBuf;
209
209
210
210
use rustc_attr_parsing:: InlineAttr ;
211
211
use rustc_data_structures:: fx:: FxIndexMap ;
212
- use rustc_data_structures:: sync:: { LRef , MTLock , par_for_each_in} ;
212
+ use rustc_data_structures:: sync:: { MTLock , par_for_each_in} ;
213
213
use rustc_data_structures:: unord:: { UnordMap , UnordSet } ;
214
214
use rustc_hir as hir;
215
215
use rustc_hir:: def:: DefKind ;
@@ -357,7 +357,7 @@ impl<'tcx> Extend<Spanned<MonoItem<'tcx>>> for MonoItems<'tcx> {
357
357
fn collect_items_rec < ' tcx > (
358
358
tcx : TyCtxt < ' tcx > ,
359
359
starting_item : Spanned < MonoItem < ' tcx > > ,
360
- state : LRef < ' _ , SharedState < ' tcx > > ,
360
+ state : & SharedState < ' tcx > ,
361
361
recursion_depths : & mut DefIdMap < usize > ,
362
362
recursion_limit : Limit ,
363
363
mode : CollectionMode ,
@@ -1671,30 +1671,26 @@ pub(crate) fn collect_crate_mono_items<'tcx>(
1671
1671
1672
1672
debug ! ( "building mono item graph, beginning at roots" ) ;
1673
1673
1674
- let mut state = SharedState {
1674
+ let state = SharedState {
1675
1675
visited : MTLock :: new ( UnordSet :: default ( ) ) ,
1676
1676
mentioned : MTLock :: new ( UnordSet :: default ( ) ) ,
1677
1677
usage_map : MTLock :: new ( UsageMap :: new ( ) ) ,
1678
1678
} ;
1679
1679
let recursion_limit = tcx. recursion_limit ( ) ;
1680
1680
1681
- {
1682
- let state: LRef < ' _ , _ > = & mut state;
1683
-
1684
- tcx. sess . time ( "monomorphization_collector_graph_walk" , || {
1685
- par_for_each_in ( roots, |root| {
1686
- let mut recursion_depths = DefIdMap :: default ( ) ;
1687
- collect_items_rec (
1688
- tcx,
1689
- dummy_spanned ( root) ,
1690
- state,
1691
- & mut recursion_depths,
1692
- recursion_limit,
1693
- CollectionMode :: UsedItems ,
1694
- ) ;
1695
- } ) ;
1681
+ tcx. sess . time ( "monomorphization_collector_graph_walk" , || {
1682
+ par_for_each_in ( roots, |root| {
1683
+ let mut recursion_depths = DefIdMap :: default ( ) ;
1684
+ collect_items_rec (
1685
+ tcx,
1686
+ dummy_spanned ( root) ,
1687
+ & state,
1688
+ & mut recursion_depths,
1689
+ recursion_limit,
1690
+ CollectionMode :: UsedItems ,
1691
+ ) ;
1696
1692
} ) ;
1697
- }
1693
+ } ) ;
1698
1694
1699
1695
// The set of MonoItems was created in an inherently indeterministic order because
1700
1696
// of parallelism. We sort it here to ensure that the output is deterministic.
0 commit comments