-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clippy treats /**…*/
doc comments differently from ///…
doc comments
#10277
Comments
They do have different representations, ctrl + f for I think you're in the right place yeah, my guess is the issue is here rust-clippy/clippy_lints/src/doc.rs Lines 472 to 474 in a2f85de
By playing with rustdoc a bit it looks we should be stripping an amount of whitespace equal to the least indented line in the block comment |
@rustbot claim |
…nishearth,flip1995 Reuse rustdoc's doc comment handling in Clippy Moves `source_span_for_markdown_range` and `span_of_attrs` (renamed to `span_of_fragments`) to `rustc_resolve::rustdoc` so it can be used in Clippy Fixes rust-lang/rust-clippy#10277 Fixes rust-lang/rust-clippy#5593 Fixes rust-lang/rust-clippy#10263 Fixes rust-lang/rust-clippy#2581
…nishearth,flip1995 Reuse rustdoc's doc comment handling in Clippy Moves `source_span_for_markdown_range` and `span_of_attrs` (renamed to `span_of_fragments`) to `rustc_resolve::rustdoc` so it can be used in Clippy Fixes rust-lang#10277 Fixes rust-lang#5593 Fixes rust-lang#10263 Fixes rust-lang#2581
Summary
I had what seemed like a spurious
clippy::missing_errors_doc
that was resolved by changing/**… */
style doc comment into a///…
style doc comment. When I did that, additional clippy lints that were previously silent were revealedReproducer
playground link I would have expected the two functions to lint identically, but clippy's missing_errors_doc does not identify the
# Errors
section in one of them. This is not specific tomissing_errors_doc
but seems to apply to lint based on the content of the doc comment. Most of them are false negatives when using/**…*/
, and as such are silent, but missing_errors_doc is a doc-comment-contents-based false-positive lint.I would happily contribute a fix with guidance. On initial investigation, maybe this is the relevant line?
Thanks!
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: