Skip to content

Rework missing_docs_in_private_items #14741

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented May 7, 2025

This is blocking #14724 as it triggers the debug assertions it adds.

The inter item span parsing was introduced to solve #12197. This is better handled by just not linting anything within bodies.

changelog: [missing_docs_in_private_items]: Don't lint items in bodies and automatically derived impls
changelog: [missing_docs_in_private_items]: Better detect when things are accessible from the crate root
changelog: [missing_docs_in_private_items]: Lint unnameable items which are accessible outside the crate

@rustbot
Copy link
Collaborator

rustbot commented May 7, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 7, 2025
@rustbot

This comment has been minimized.

@Jarcho
Copy link
Contributor Author

Jarcho commented May 7, 2025

Looks like vscode did something weird and disappeared the new test file.

@Jarcho Jarcho force-pushed the missing_doc_span branch from 8bd06ae to 54606f5 Compare May 14, 2025 05:39
@Jarcho
Copy link
Contributor Author

Jarcho commented Jul 17, 2025

r? clippy

@rustbot rustbot assigned dswij and unassigned Alexendoo Jul 17, 2025
@Jarcho Jarcho force-pushed the missing_doc_span branch from 54606f5 to 554752d Compare July 18, 2025 10:32
Copy link

github-actions bot commented Jul 18, 2025

Lintcheck changes for 41ee3b4

Lint Added Removed Changed
clippy::missing_docs_in_private_items 150 1883 22257
clippy::too_long_first_doc_paragraph 0 2 2

This comment will be updated if you push new changes

Jarcho added 2 commits July 19, 2025 11:03
* Don't search spans between items for comments.
* Don't lint items inside bodies, automatically derived impls.
* Don't lint items inside macro generated modules unless they are namable outside.
* Delay `is_from_proc_macro` checks
* Handle reexports when checking if an item is reachable from the crate root.
* Don't lint the crate root.
@Jarcho Jarcho force-pushed the missing_doc_span branch from 554752d to 41ee3b4 Compare July 19, 2025 20:29
@Jarcho Jarcho mentioned this pull request Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants