Closed
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