Skip to content

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
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the lintcheck result, it looks like the quality of the lint messages have regressed. For example, talking about "impl item" instead of "associated function" or "method" might make it less clear to the user.

For example, the compiler makes this distinction.

View changes since this review

@Jarcho
Copy link
Contributor Author

Jarcho commented Sep 17, 2025

Is the distinction really needed here? The only time it might even be helpful is when you view the message without the span which isn't the how you would normally view warnings. Calling all items / trait items / impl items just "item" might be better than even making the current distinction.

@rustbot
Copy link
Collaborator

rustbot commented Sep 18, 2025

☔ The latest upstream changes (possibly 20ce69b) made this pull request unmergeable. Please resolve the merge conflicts.

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.

5 participants