-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
unexpected behavior of pub(in other_module)
#109657
Comments
The Rust Reference says:
|
so I guess the fix is
|
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
Shouldn't it change to error of declaring an item with |
Resolution for paths inside For paths in macro calls and reexports we would put such unresolved path into a queue to try resolving it later, because for macros and imports it's important for correctness. For paths in visibilities nobody cared to organize such a queue with retries, because it would complicate things and would only affect diagnostics but not correctness, and non |
I remember that there's an older duplicate for this issue, but can't find it right now. |
You could notice the difference in diagnostics if you swap the order between |
results in
this error feels very weird 🤔
I see the following possible fixes here:
in super::sibling
error should be changed to explain what's going on here and why that doesn't workfound via #109511 (comment)
cc @petrochenkov in case you know more about what's going on here.
The text was updated successfully, but these errors were encountered: