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

@ -323,7 +323,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
let gate = match op.status_in_item(self.ccx) {
Status::Allowed => return,
Status::Unstable(gate) if self.tcx.features().enabled(gate) => {
Status::Unstable(gate) if self.tcx.features().active(gate) => {
let unstable_in_stable = self.ccx.is_const_stable_const_fn()
&& !super::rustc_allow_const_fn_unstable(self.tcx, self.def_id(), gate);
if unstable_in_stable {