Skip to content

Lint against mod lib; #9677

@crlf0710

Description

@crlf0710

What it does

Found that some beginners write mod lib; in main.rs to reference lib.rs contents. Definitely not what people actually want to do!

Lint Name

No response

Category

suspicious

Advantage

No response

Drawbacks

No response

Example

// main.rs
mod lib;

Could be written as:

use this_package as lib;

Metadata

Metadata

Assignees

Labels

A-lintArea: New lintsgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions