-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
E0583: Improve error message to help with use vs mod confusion #69492
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feedback from a user forum thread. This code:
currently suggests:
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
useinstead.