1
Fork 0

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:
Nicholas Nethercote 2023-10-05 19:43:35 +11:00
parent 41b6899487
commit d284c8a2d7
14 changed files with 199 additions and 201 deletions

View file

@ -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() {
[] => {