Use DefIdMap instead of FxHashMap for impl_item_implementor_ids query.
This commit is contained in:
@@ -757,7 +757,7 @@ rustc_queries! {
|
||||
///
|
||||
/// The map returned for `tcx.impl_item_implementor_ids(impl_id)` would be
|
||||
///`{ trait_f: impl_f, trait_g: impl_g }`
|
||||
query impl_item_implementor_ids(impl_id: DefId) -> &'tcx FxHashMap<DefId, DefId> {
|
||||
query impl_item_implementor_ids(impl_id: DefId) -> &'tcx DefIdMap<DefId> {
|
||||
arena_cache
|
||||
desc { |tcx| "comparing impl items against trait for `{}`", tcx.def_path_str(impl_id) }
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::def_id::{DefId, DefIdMap, LocalDefId};
|
||||
use rustc_hir::definitions::DefPathData;
|
||||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_middle::ty::{self, DefIdTree, TyCtxt};
|
||||
@@ -40,7 +39,7 @@ fn associated_items(tcx: TyCtxt<'_>, def_id: DefId) -> ty::AssocItems {
|
||||
}
|
||||
}
|
||||
|
||||
fn impl_item_implementor_ids(tcx: TyCtxt<'_>, impl_id: DefId) -> FxHashMap<DefId, DefId> {
|
||||
fn impl_item_implementor_ids(tcx: TyCtxt<'_>, impl_id: DefId) -> DefIdMap<DefId> {
|
||||
tcx.associated_items(impl_id)
|
||||
.in_definition_order()
|
||||
.filter_map(|item| item.trait_item_def_id.map(|trait_item| (trait_item, item.def_id)))
|
||||
|
||||
Reference in New Issue
Block a user