Module items not in scoped for module `//!` comment when module also has `///` comment
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Not very clear how //! in top of module or /// before 'mod' declaration works and what difference. I found one big difference when doing /// then in rest of //! at top of module, module items are not in the scoped.
I understand it's normal module importer doesnt ahve module items in scoped by default. But its not normal that module itself doesnt have items in the scoped.
Smallest reproduction case: https://github.com/xmppftw/rustrepro/tree/issue-134904
- maybe it's a bug?
- maybe it's bad to use /// and //! but i dont see this in rustdoc book or somewhere else
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked smallest reproduction case and compare module item scoping when a module has a //! comment versus a /// comment before its mod declaration. Check the rustdoc book or related documentation for the intended behavior, then establish whether the reproduction is expected or needs a compiler fix and add a focused regression test or documentation clarification accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100