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:
parent
41b6899487
commit
d284c8a2d7
14 changed files with 199 additions and 201 deletions
|
@ -2249,7 +2249,7 @@ declare_lint! {
|
|||
}
|
||||
|
||||
declare_lint_pass!(
|
||||
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `rustc_feature/src/active.rs`.
|
||||
/// Check for used feature gates in `INCOMPLETE_FEATURES` in `rustc_feature/src/unstable.rs`.
|
||||
IncompleteInternalFeatures => [INCOMPLETE_FEATURES, INTERNAL_FEATURES]
|
||||
);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ pub(crate) fn provide(providers: &mut Providers) {
|
|||
}
|
||||
|
||||
fn check_expectations(tcx: TyCtxt<'_>, tool_filter: Option<Symbol>) {
|
||||
if !tcx.features().enabled(sym::lint_reasons) {
|
||||
if !tcx.features().active(sym::lint_reasons) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1062,7 +1062,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||
#[track_caller]
|
||||
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
|
||||
if let Some(feature) = lint_id.lint.feature_gate {
|
||||
if !self.features.enabled(feature) {
|
||||
if !self.features.active(feature) {
|
||||
let lint = builtin::UNKNOWN_LINTS;
|
||||
let (level, src) = self.lint_level(builtin::UNKNOWN_LINTS);
|
||||
struct_lint_level(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue