Skip to content

Commit 137eea8

Browse files
committed
Make CrateConfig make order depended for linting purpose
1 parent b10aed0 commit 137eea8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_session/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ fn default_configuration(sess: &Session) -> CrateConfig {
891891
sess.fatal(&err);
892892
});
893893

894-
let mut ret = FxHashSet::default();
894+
let mut ret = CrateConfig::default();
895895
ret.reserve(7); // the minimum number of insertions
896896
// Target bindings.
897897
ret.insert((sym::target_os, Some(Symbol::intern(os))));

compiler/rustc_session/src/parse.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::lint::{
88
};
99
use crate::SessionDiagnostic;
1010
use rustc_ast::node_id::NodeId;
11-
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
11+
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet};
1212
use rustc_data_structures::sync::{Lock, Lrc};
1313
use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler};
1414
use rustc_errors::{
@@ -25,7 +25,7 @@ use std::str;
2525

2626
/// The set of keys (and, optionally, values) that define the compilation
2727
/// environment of the crate, used to drive conditional compilation.
28-
pub type CrateConfig = FxHashSet<(Symbol, Option<Symbol>)>;
28+
pub type CrateConfig = FxIndexSet<(Symbol, Option<Symbol>)>;
2929
pub type CrateCheckConfig = CheckCfg<Symbol>;
3030

3131
/// Collected spans during parsing for places where a certain feature was
@@ -241,7 +241,7 @@ impl ParseSess {
241241
Self {
242242
span_diagnostic: handler,
243243
unstable_features: UnstableFeatures::from_environment(None),
244-
config: FxHashSet::default(),
244+
config: FxIndexSet::default(),
245245
check_config: CrateCheckConfig::default(),
246246
edition: ExpnId::root().expn_data().edition,
247247
raw_identifier_spans: Lock::new(Vec::new()),

0 commit comments

Comments
 (0)