Make lints work with allow_internal_unstable

This commit is contained in:
Jules Bertholet
2023-10-29 23:26:01 -04:00
committed by Jonas Platte
parent 2e53675668
commit acb0e71c49

View File

@@ -933,6 +933,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
let feature = if let Some(feature) = lint_id.lint.feature_gate
&& !self.features.enabled(feature)
&& !span.allows_unstable(feature)
{
// Lint is behind a feature that is not enabled; eventually return false.
feature