Closed
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?