-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.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.
Description
mod parent {
mod this {
pub(in super::sibling) fn foo() {}
}
mod sibling {
fn bar() {
super::this::foo();
}
}
}
results in
error[E0433]: failed to resolve: could not find `sibling` in `super`
--> src/lib.rs:3:23
|
3 | pub(in super::sibling) fn foo() {}
| ^^^^^^^ could not find `sibling` in `super`
this error feels very weird 🤔
I see the following possible fixes here:
- this is a bug with name resolution and should compile
- the
in super::sibling
error should be changed to explain what's going on here and why that doesn't work
found via #109511 (comment)
cc @petrochenkov in case you know more about what's going on here.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.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.