diff options
| author | yukang <moorekang@gmail.com> | 2024-02-11 19:50:50 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2024-02-14 18:36:37 +0800 |
| commit | 3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de (patch) | |
| tree | ec5e00a1b03dfa35e7da6b6bff274552468206a2 /compiler/rustc_hir_analysis/src/collect.rs | |
| parent | b381d3ab27f788f990551100c4425bb782d26d76 (diff) | |
| download | rust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.tar.gz rust-3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de.zip | |
clean up potential_query_instability with FxIndexMap and UnordMap
Diffstat (limited to 'compiler/rustc_hir_analysis/src/collect.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/collect.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs index d92e1a14151..5346dcccdc7 100644 --- a/compiler/rustc_hir_analysis/src/collect.rs +++ b/compiler/rustc_hir_analysis/src/collect.rs @@ -15,7 +15,7 @@ //! crate as a kind of pass. This should eventually be factored away. use rustc_data_structures::captures::Captures; -use rustc_data_structures::fx::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; use rustc_data_structures::unord::UnordMap; use rustc_errors::{Applicability, DiagnosticBuilder, ErrorGuaranteed, StashKey}; use rustc_hir as hir; @@ -835,12 +835,12 @@ impl From<NestedSpan> for FieldDeclSpan { struct FieldUniquenessCheckContext<'tcx> { tcx: TyCtxt<'tcx>, - seen_fields: FxHashMap<Ident, FieldDeclSpan>, + seen_fields: FxIndexMap<Ident, FieldDeclSpan>, } impl<'tcx> FieldUniquenessCheckContext<'tcx> { fn new(tcx: TyCtxt<'tcx>) -> Self { - Self { tcx, seen_fields: FxHashMap::default() } + Self { tcx, seen_fields: FxIndexMap::default() } } /// Check if a given field `ident` declared at `field_decl` has been declared elsewhere before. |
