diff options
| author | bors <bors@rust-lang.org> | 2024-02-15 12:36:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-15 12:36:37 +0000 |
| commit | fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f (patch) | |
| tree | 3960d1bfebde79b981e9ac87e62bbc65a1e792d9 /compiler/rustc_session/src | |
| parent | 6a4222b5119bce8c24e74dd3ad44006ce0c803e6 (diff) | |
| parent | 3f27e4b3ea35c87c1e8a6b9b8a3c7e122f6299de (diff) | |
| download | rust-fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f.tar.gz rust-fa9f77ff35b4b63ed0cef9a9642c8f881b33f14f.zip | |
Auto merge of #120931 - chenyukang:yukang-cleanup-hashmap, r=michaelwoerister
Clean up potential_query_instability with FxIndexMap and UnordMap From https://github.com/rust-lang/rust/pull/120485#issuecomment-1916437191 r? `@michaelwoerister`
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 8adb0cbcc9d..288e0a5ca6f 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -11,7 +11,7 @@ use crate::lint::{ }; use crate::Session; use rustc_ast::node_id::NodeId; -use rustc_data_structures::fx::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet}; use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, DiagCtxt}; use rustc_errors::{ @@ -205,19 +205,19 @@ pub struct ParseSess { /// Places where identifiers that contain invalid Unicode codepoints but that look like they /// should be. Useful to avoid bad tokenization when encountering emoji. We group them to /// provide a single error per unique incorrect identifier. - pub bad_unicode_identifiers: Lock<FxHashMap<Symbol, Vec<Span>>>, + pub bad_unicode_identifiers: Lock<FxIndexMap<Symbol, Vec<Span>>>, source_map: Lrc<SourceMap>, pub buffered_lints: Lock<Vec<BufferedEarlyLint>>, /// Contains the spans of block expressions that could have been incomplete based on the /// operation token that followed it, but that the parser cannot identify without further /// analysis. - pub ambiguous_block_expr_parse: Lock<FxHashMap<Span, Span>>, + pub ambiguous_block_expr_parse: Lock<FxIndexMap<Span, Span>>, pub gated_spans: GatedSpans, pub symbol_gallery: SymbolGallery, /// Environment variables accessed during the build and their values when they exist. - pub env_depinfo: Lock<FxHashSet<(Symbol, Option<Symbol>)>>, + pub env_depinfo: Lock<FxIndexSet<(Symbol, Option<Symbol>)>>, /// File paths accessed during the build. - pub file_depinfo: Lock<FxHashSet<Symbol>>, + pub file_depinfo: Lock<FxIndexSet<Symbol>>, /// Whether cfg(version) should treat the current release as incomplete pub assume_incomplete_release: bool, /// Spans passed to `proc_macro::quote_span`. Each span has a numerical @@ -247,7 +247,7 @@ impl ParseSess { bad_unicode_identifiers: Lock::new(Default::default()), source_map, buffered_lints: Lock::new(vec![]), - ambiguous_block_expr_parse: Lock::new(FxHashMap::default()), + ambiguous_block_expr_parse: Lock::new(Default::default()), gated_spans: GatedSpans::default(), symbol_gallery: SymbolGallery::default(), env_depinfo: Default::default(), |
