Rename ACTIVE_FEATURES as UNSTABLE_FEATURES.
It's a better name, and lets "active features" refer to the features that are active in a particular program, due to being declared or enabled by the edition. The commit also renames `Features::enabled` as `Features::active` to match this; I changed my mind and have decided that "active" is a little better thatn "enabled" for this, particularly because a number of pre-existing comments use "active" in this way. Finally, the commit renames `Status::Stable` as `Status::Accepted`, to match `ACCEPTED_FEATURES`.
This commit is contained in:
@@ -86,7 +86,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
|
||||
let is_feature_allowed = |feature_gate| {
|
||||
// All features require that the corresponding gate be enabled,
|
||||
// even if the function has `#[rustc_allow_const_fn_unstable(the_gate)]`.
|
||||
if !tcx.features().enabled(feature_gate) {
|
||||
if !tcx.features().active(feature_gate) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ impl<'tcx> CheckConstVisitor<'tcx> {
|
||||
|
||||
let required_gates = required_gates.unwrap_or(&[]);
|
||||
let missing_gates: Vec<_> =
|
||||
required_gates.iter().copied().filter(|&g| !features.enabled(g)).collect();
|
||||
required_gates.iter().copied().filter(|&g| !features.active(g)).collect();
|
||||
|
||||
match missing_gates.as_slice() {
|
||||
[] => {
|
||||
|
||||
Reference in New Issue
Block a user