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`.
This commit is contained in:
parent
2142d014ab
commit
32986d895f
@ -9,7 +9,7 @@ use crate::lint::{
|
|||||||
builtin::UNSTABLE_SYNTAX_PRE_EXPANSION, BufferedEarlyLint, BuiltinLintDiagnostics, Lint, LintId,
|
builtin::UNSTABLE_SYNTAX_PRE_EXPANSION, BufferedEarlyLint, BuiltinLintDiagnostics, Lint, LintId,
|
||||||
};
|
};
|
||||||
use rustc_ast::node_id::NodeId;
|
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_data_structures::sync::{AppendOnlyVec, Lock, Lrc};
|
||||||
use rustc_errors::{emitter::SilentEmitter, Handler};
|
use rustc_errors::{emitter::SilentEmitter, Handler};
|
||||||
use rustc_errors::{
|
use rustc_errors::{
|
||||||
@ -27,7 +27,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 = FxIndexSet<(Symbol, Option<Symbol>)>;
|
pub type CrateConfig = FxHashSet<(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
|
||||||
@ -237,7 +237,7 @@ impl ParseSess {
|
|||||||
Self {
|
Self {
|
||||||
span_diagnostic: handler,
|
span_diagnostic: handler,
|
||||||
unstable_features: UnstableFeatures::from_environment(None),
|
unstable_features: UnstableFeatures::from_environment(None),
|
||||||
config: FxIndexSet::default(),
|
config: FxHashSet::default(),
|
||||||
check_config: CrateCheckConfig::default(),
|
check_config: CrateCheckConfig::default(),
|
||||||
edition: ExpnId::root().expn_data().edition,
|
edition: ExpnId::root().expn_data().edition,
|
||||||
raw_identifier_spans: Default::default(),
|
raw_identifier_spans: Default::default(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user