-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.
Description
Given the following code:
mod a {
pub(in a) fn foo() {}
}
fn main() {}
When compiled using Edition 2018 or 2021
error: relative paths are not supported in visibilities on 2018 edition
--> src/main.rs:2:10
|
2 | pub(in a) fn foo() {}
| ^ help: try: `crate::a`
error: aborting due to previous error
This error message is misleading and should likely be changed to "only supported in 2015 edition" or "not supported in 2018 edition or later"
error: relative paths are not supported in visibilities in 2018 edition or later
--> src/main.rs:2:10
|
2 | pub(in a) fn foo() {}
| ^ help: try: `crate::a`
error: aborting due to previous error
compiler-errors
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.