Closed
Description
Feedback from a user forum thread. This code:
mod foo {
}
mod bar {
mod foo;
}
currently suggests:
= help: name the file either foo.rs or foo/mod.rs inside the directory "src/bar"
This is awkwardly worded. It doesn't clearly explain that this syntax creates a new module. It doesn't guess that the user may have meant use crate::foo
.
I suggest:
-
Improve wording of the message. "To create a new module
crate::bar::foo
, create "src/bar/foo.rs" file" (to keep it simple, without also suggesting 2015-edition path). -
If there already is a module with that name, suggest
use
instead.