-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Error on bad pub(path) depends on module ordering #40066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've stumbled across this problem earlier today, see my dupe report above. It was my first attempt at using that feature, and I wasn't aware that only ancestor modules are allowed, and this issue added to the confusion. |
This bug still exists. The syntax of path visibilities has changed to require |
@withoutboats: thanks for reviewing, I'll write mentoring instructions then. |
Mentoring instructions:
|
Bug still exists in 2018 edition but you have to write |
Triage: no change. |
#109657 is a duplicate of this issue and contains some explanation for the suboptimal diagnostics here. |
Which error message you get with a non-ancestral
pub(path)
visibility restriction depends on the ordering of module declarations.These two struct declarations produce different errors;
The second produces the correct error:
The first produces this, incorrect error:
Presumably the pub(path) code is operating on the assumption the path, if real, has already been walked (because any correct path would have been walked), but this is not the case.
The text was updated successfully, but these errors were encountered: