Skip to content

Commit acb0e71

Browse files
Jules-Bertholetjplatte
authored andcommitted
Make lints work with allow_internal_unstable
1 parent 2e53675 commit acb0e71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_lint/src/levels.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
933933
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
934934
let feature = if let Some(feature) = lint_id.lint.feature_gate
935935
&& !self.features.enabled(feature)
936+
&& !span.allows_unstable(feature)
936937
{
937938
// Lint is behind a feature that is not enabled; eventually return false.
938939
feature

0 commit comments

Comments
 (0)