diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-27 15:49:09 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-28 09:03:51 +1100 |
| commit | 32986d895f9105de00a87d7f3d8897477ab64803 (patch) | |
| tree | f3b434a26a65fb732b36064c4c46668ee0f5d47f | |
| parent | 2142d014ab9010ed87b3d5c865190bd1210c9073 (diff) | |
| download | rust-32986d895f9105de00a87d7f3d8897477ab64803.tar.gz rust-32986d895f9105de00a87d7f3d8897477ab64803.zip | |
Change `CrateConfig` from `FxIndexSet` to `FxHashSet`.
Because its order doesn't matter. This is well demonstrated by `to_crate_config`, which creates a `CrateConfig` from an `FxHashSet`.
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index abb0ab5630c..316b9cc7acb 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -9,7 +9,7 @@ use crate::lint::{ builtin::UNSTABLE_SYNTAX_PRE_EXPANSION, BufferedEarlyLint, BuiltinLintDiagnostics, Lint, LintId, }; use rustc_ast::node_id::NodeId; -use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, Handler}; use rustc_errors::{ @@ -27,7 +27,7 @@ use std::str; /// The set of keys (and, optionally, values) that define the compilation /// environment of the crate, used to drive conditional compilation. -pub type CrateConfig = FxIndexSet<(Symbol, Option<Symbol>)>; +pub type CrateConfig = FxHashSet<(Symbol, Option<Symbol>)>; pub type CrateCheckConfig = CheckCfg<Symbol>; /// Collected spans during parsing for places where a certain feature was @@ -237,7 +237,7 @@ impl ParseSess { Self { span_diagnostic: handler, unstable_features: UnstableFeatures::from_environment(None), - config: FxIndexSet::default(), + config: FxHashSet::default(), check_config: CrateCheckConfig::default(), edition: ExpnId::root().expn_data().edition, raw_identifier_spans: Default::default(), |
