"could not find inline
in the crate root" should say "visibilities can only be restricted to ancestor modules"
#118011
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
inline
does exist, it's just not allowed to be used inpub
in this context.Other cases
Reordering
mod inline {}
above themod foo
declaration produces the correct suggestion:Anything else?
version: rustc 1.75.0-nightly (75b064d 2023-11-01)
@rustbot label A-resolve
The text was updated successfully, but these errors were encountered: