Skip to content

Enabling internal lints shouldn't be dependent on -Zunstable-options #122897

Open
@compiler-errors

Description

@compiler-errors

We currently enable internal lints only if -Zunstable-options is passed:

/// Returns `true` if internal lints should be added to the lint store - i.e. if
/// `-Zunstable-options` is provided and this isn't rustdoc (internal lints can trigger errors
/// to be emitted under rustdoc).
pub fn enable_internal_lints(&self) -> bool {
self.unstable_options() && !self.opts.actually_rustdoc
}

This behavior is surprising at least, and seems wrong. Should we move this to some -Zenable-internal-lints or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-discussionCategory: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions