diff options
| author | Urgau <urgau@numericable.fr> | 2022-09-01 16:22:30 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2022-09-02 12:49:07 +0200 |
| commit | 137eea86db9abc255ceb5de167c5f4d7ee53846e (patch) | |
| tree | 79a9f65b484c36b3b98f4b661635dd5daf874fe8 /compiler/rustc_session/src | |
| parent | b10aed0084e3fb32b365dba06a1b644c3b0f438b (diff) | |
| download | rust-137eea86db9abc255ceb5de167c5f4d7ee53846e.tar.gz rust-137eea86db9abc255ceb5de167c5f4d7ee53846e.zip | |
Make CrateConfig make order depended for linting purpose
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_session/src/parse.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 7c50fe2d823..7528c27ce48 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -891,7 +891,7 @@ fn default_configuration(sess: &Session) -> CrateConfig { sess.fatal(&err); }); - let mut ret = FxHashSet::default(); + let mut ret = CrateConfig::default(); ret.reserve(7); // the minimum number of insertions // Target bindings. ret.insert((sym::target_os, Some(Symbol::intern(os)))); diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index ebec754dcff..5b95d73bd4d 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -8,7 +8,7 @@ use crate::lint::{ }; use crate::SessionDiagnostic; use rustc_ast::node_id::NodeId; -use rustc_data_structures::fx::{FxHashMap, FxHashSet}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet}; use rustc_data_structures::sync::{Lock, Lrc}; use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler}; use rustc_errors::{ @@ -25,7 +25,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 = FxHashSet<(Symbol, Option<Symbol>)>; +pub type CrateConfig = FxIndexSet<(Symbol, Option<Symbol>)>; pub type CrateCheckConfig = CheckCfg<Symbol>; /// Collected spans during parsing for places where a certain feature was @@ -241,7 +241,7 @@ impl ParseSess { Self { span_diagnostic: handler, unstable_features: UnstableFeatures::from_environment(None), - config: FxHashSet::default(), + config: FxIndexSet::default(), check_config: CrateCheckConfig::default(), edition: ExpnId::root().expn_data().edition, raw_identifier_spans: Lock::new(Vec::new()), |
