-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST
Description
It's a common mistake to have code like:
mod foo;
mod bar {
mod foo;
}Many newcomers expect this to have two instances of the same module foo. This in fact declares two separate foo modules which have different types (even though they have the same contents).
We should print a suppressable warning about when this happens. Something along the lines of second inclusion of foo.rs, did you mean to "use" the module instead?
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST