Return an indexmap in all_local_trait_impls query

The data structure previously used here required Ord.
As part of #90317, we do not want DefId to implement Ord.
This commit is contained in:
pierwill 2022-01-25 17:40:10 -06:00
parent 92ed8747f2
commit f5fe6cd277
4 changed files with 5 additions and 7 deletions

View file

@ -67,7 +67,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;
@ -1059,7 +1059,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>,