|
5 | 5 | // makes all other generics or inline functions that it references |
6 | 6 | // reachable as well. |
7 | 7 |
|
8 | | -use rustc_data_structures::fx::FxHashSet; |
| 8 | +use hir::def_id::LocalDefIdSet; |
9 | 9 | use rustc_hir as hir; |
10 | 10 | use rustc_hir::def::{DefKind, Res}; |
11 | 11 | use rustc_hir::def_id::{DefId, LocalDefId}; |
@@ -63,7 +63,7 @@ struct ReachableContext<'tcx> { |
63 | 63 | tcx: TyCtxt<'tcx>, |
64 | 64 | maybe_typeck_results: Option<&'tcx ty::TypeckResults<'tcx>>, |
65 | 65 | // The set of items which must be exported in the linkage sense. |
66 | | - reachable_symbols: FxHashSet<LocalDefId>, |
| 66 | + reachable_symbols: LocalDefIdSet, |
67 | 67 | // A worklist of item IDs. Each item ID in this worklist will be inlined |
68 | 68 | // and will be scanned for further references. |
69 | 69 | // FIXME(eddyb) benchmark if this would be faster as a `VecDeque`. |
@@ -175,7 +175,7 @@ impl<'tcx> ReachableContext<'tcx> { |
175 | 175 |
|
176 | 176 | // Step 2: Mark all symbols that the symbols on the worklist touch. |
177 | 177 | fn propagate(&mut self) { |
178 | | - let mut scanned = FxHashSet::default(); |
| 178 | + let mut scanned = LocalDefIdSet::default(); |
179 | 179 | while let Some(search_item) = self.worklist.pop() { |
180 | 180 | if !scanned.insert(search_item) { |
181 | 181 | continue; |
@@ -361,7 +361,7 @@ fn has_custom_linkage(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool { |
361 | 361 | || codegen_attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER) |
362 | 362 | } |
363 | 363 |
|
364 | | -fn reachable_set(tcx: TyCtxt<'_>, (): ()) -> FxHashSet<LocalDefId> { |
| 364 | +fn reachable_set(tcx: TyCtxt<'_>, (): ()) -> LocalDefIdSet { |
365 | 365 | let effective_visibilities = &tcx.effective_visibilities(()); |
366 | 366 |
|
367 | 367 | let any_library = |
|
0 commit comments