Skip to content

Lint on mod foo {} inside of foo.rs #141385

Open
@estebank

Description

@estebank

One newcomer mistake is getting confused by the module system ending up with crate::module::module by having pub mod module {} inside of module.rs. We should have a lint that detects this case and gently nudges the user towards the more likely intended structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language 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