about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-02 15:36:12 +0000
committerbors <bors@rust-lang.org>2022-02-02 15:36:12 +0000
commit7cd14d2f561a61e9838546f133afcf06038d761b (patch)
tree114d7089a5393c7dd9c7a8c28101604bfa5e6196 /compiler/rustc_resolve/src
parentdca1e7aa5a8ac05ddaea731f4eab20de91acb46b (diff)
parentf5fe6cd27748d519f8c0751b62bc008595736733 (diff)
Auto merge of #93312 - pierwill:map-all-local-trait-impls, r=cjgillot
Return an indexmap in `all_local_trait_impls` query

The data structure previously used here required that `DefId` be `Ord`. As part of #90317, we do not want `DefId` to implement `Ord`.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index d5ad95ace97..28f06ed3a26 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -68,7 +68,7 @@ use rustc_span::{Span, DUMMY_SP};
 
 use smallvec::{smallvec, SmallVec};
 use std::cell::{Cell, RefCell};
-use std::collections::{BTreeMap, BTreeSet};
+use std::collections::BTreeSet;
 use std::ops::ControlFlow;
 use std::{cmp, fmt, iter, mem, ptr};
 use tracing::debug;
@@ -1061,7 +1061,7 @@ pub struct Resolver<'a> {
     item_generics_num_lifetimes: FxHashMap<LocalDefId, usize>,
 
     main_def: Option<MainDefinition>,
-    trait_impls: BTreeMap<DefId, Vec<LocalDefId>>,
+    trait_impls: FxIndexMap<DefId, Vec<LocalDefId>>,
     /// A list of proc macro LocalDefIds, written out in the order in which
     /// they are declared in the static array generated by proc_macro_harness.
     proc_macros: Vec<NodeId>,