mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Use declared_features
to avoid two lookups.
This commit is contained in:
parent
56fd2531ac
commit
9d4e49b386
@ -116,8 +116,7 @@ macro_rules! declare_features {
|
||||
sym::$feature => status_to_enum!($status) == FeatureStatus::Incomplete,
|
||||
)*
|
||||
// accepted and removed features aren't in this file but are never incomplete
|
||||
_ if self.declared_lang_features.iter().any(|f| f.0 == feature) => false,
|
||||
_ if self.declared_lib_features.iter().any(|f| f.0 == feature) => false,
|
||||
_ if self.declared_features.contains(&feature) => false,
|
||||
_ => panic!("`{}` was not listed in `declare_features`", feature),
|
||||
}
|
||||
}
|
||||
@ -132,8 +131,7 @@ macro_rules! declare_features {
|
||||
)*
|
||||
// accepted and removed features aren't in this file but are never internal
|
||||
// (a removed feature might have been internal, but it doesn't matter anymore)
|
||||
_ if self.declared_lang_features.iter().any(|f| f.0 == feature) => false,
|
||||
_ if self.declared_lib_features.iter().any(|f| f.0 == feature) => false,
|
||||
_ if self.declared_features.contains(&feature) => false,
|
||||
_ => panic!("`{}` was not listed in `declare_features`", feature),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user