@@ -67,7 +67,7 @@ crate struct DocContext<'tcx> {
67
67
crate ct_substs : RefCell < FxHashMap < DefId , clean:: Constant > > ,
68
68
/// Table synthetic type parameter for `impl Trait` in argument position -> bounds
69
69
crate impl_trait_bounds : RefCell < FxHashMap < ImplTraitParam , Vec < clean:: GenericBound > > > ,
70
- crate fake_def_ids : RefCell < FxHashMap < CrateNum , DefIndex > > ,
70
+ crate fake_def_ids : FxHashMap < CrateNum , DefIndex > ,
71
71
/// Auto-trait or blanket impls processed so far, as `(self_ty, trait_def_id)`.
72
72
// FIXME(eddyb) make this a `ty::TraitRef<'tcx>` set.
73
73
crate generated_synthetics : RefCell < FxHashSet < ( Ty < ' tcx > , DefId ) > > ,
@@ -140,16 +140,14 @@ impl<'tcx> DocContext<'tcx> {
140
140
/// [`RefCell`]: std::cell::RefCell
141
141
/// [`Debug`]: std::fmt::Debug
142
142
/// [`clean::Item`]: crate::clean::types::Item
143
- crate fn next_def_id ( & self , crate_num : CrateNum ) -> DefId {
144
- let mut fake_ids = self . fake_def_ids . borrow_mut ( ) ;
145
-
146
- let def_index = match fake_ids. entry ( crate_num) {
143
+ crate fn next_def_id ( & mut self , crate_num : CrateNum ) -> DefId {
144
+ let def_index = match self . fake_def_ids . entry ( crate_num) {
147
145
Entry :: Vacant ( e) => {
148
146
let num_def_idx = {
149
147
let num_def_idx = if crate_num == LOCAL_CRATE {
150
148
self . tcx . hir ( ) . definitions ( ) . def_path_table ( ) . num_def_ids ( )
151
149
} else {
152
- self . enter_resolver ( |r| r. cstore ( ) . num_def_ids ( crate_num) )
150
+ self . resolver . borrow_mut ( ) . access ( |r| r. cstore ( ) . num_def_ids ( crate_num) )
153
151
} ;
154
152
155
153
DefIndex :: from_usize ( num_def_idx)
0 commit comments