Make CrateConfig make order depended for linting purpose
This commit is contained in:
parent
b10aed0084
commit
137eea86db
2 changed files with 4 additions and 4 deletions
|
@ -891,7 +891,7 @@ fn default_configuration(sess: &Session) -> CrateConfig {
|
||||||
sess.fatal(&err);
|
sess.fatal(&err);
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut ret = FxHashSet::default();
|
let mut ret = CrateConfig::default();
|
||||||
ret.reserve(7); // the minimum number of insertions
|
ret.reserve(7); // the minimum number of insertions
|
||||||
// Target bindings.
|
// Target bindings.
|
||||||
ret.insert((sym::target_os, Some(Symbol::intern(os))));
|
ret.insert((sym::target_os, Some(Symbol::intern(os))));
|
||||||
|
|
|
@ -8,7 +8,7 @@ use crate::lint::{
|
||||||
};
|
};
|
||||||
use crate::SessionDiagnostic;
|
use crate::SessionDiagnostic;
|
||||||
use rustc_ast::node_id::NodeId;
|
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_data_structures::sync::{Lock, Lrc};
|
||||||
use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler};
|
use rustc_errors::{emitter::SilentEmitter, ColorConfig, Handler};
|
||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
|
@ -25,7 +25,7 @@ use std::str;
|
||||||
|
|
||||||
/// The set of keys (and, optionally, values) that define the compilation
|
/// The set of keys (and, optionally, values) that define the compilation
|
||||||
/// environment of the crate, used to drive conditional 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>;
|
pub type CrateCheckConfig = CheckCfg<Symbol>;
|
||||||
|
|
||||||
/// Collected spans during parsing for places where a certain feature was
|
/// Collected spans during parsing for places where a certain feature was
|
||||||
|
@ -241,7 +241,7 @@ impl ParseSess {
|
||||||
Self {
|
Self {
|
||||||
span_diagnostic: handler,
|
span_diagnostic: handler,
|
||||||
unstable_features: UnstableFeatures::from_environment(None),
|
unstable_features: UnstableFeatures::from_environment(None),
|
||||||
config: FxHashSet::default(),
|
config: FxIndexSet::default(),
|
||||||
check_config: CrateCheckConfig::default(),
|
check_config: CrateCheckConfig::default(),
|
||||||
edition: ExpnId::root().expn_data().edition,
|
edition: ExpnId::root().expn_data().edition,
|
||||||
raw_identifier_spans: Lock::new(Vec::new()),
|
raw_identifier_spans: Lock::new(Vec::new()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue