mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
6de87829da
This change addresses cases where doc comments are separated by blank lines, comments, or non-doc-comment attributes, like this: ```rust /// - first line // not part of doc comment /// second line ``` Before this commit, Clippy gave a pedantically-correct warning about how you needed to indent the second line. This is unlikely to be what the user intends, and has been described as a "false positive" (since Clippy is warning you about a highly unintuitive behavior that Rustdoc actually has, we definitely want it to output *something*, but the suggestion to indent was poor). https://github.com/rust-lang/rust-clippy/issues/12917
76 lines
2 KiB
Text
76 lines
2 KiB
Text
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:4:5
|
|
|
|
|
LL | /// lazy continuation
|
|
| ^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
= note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > lazy continuation
|
|
| +
|
|
|
|
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:20:5
|
|
|
|
|
LL | /// > lazy continuation
|
|
| ^^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > > lazy continuation
|
|
| +
|
|
|
|
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:27:5
|
|
|
|
|
LL | /// lazy continuation
|
|
| ^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > > lazy continuation
|
|
| +++
|
|
|
|
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:32:5
|
|
|
|
|
LL | /// lazy continuation
|
|
| ^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > > lazy continuation
|
|
| +++++++
|
|
|
|
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:37:5
|
|
|
|
|
LL | /// lazy continuation
|
|
| ^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > > lazy continuation
|
|
| +++++
|
|
|
|
error: doc quote line without `>` marker
|
|
--> tests/ui/doc/doc_lazy_blockquote.rs:45:5
|
|
|
|
|
LL | /// lazy continuation (this results in strange indentation, but still works)
|
|
| ^
|
|
|
|
|
= help: if this not intended to be a quote at all, escape it with `\>`
|
|
help: add markers to start of line
|
|
|
|
|
LL | /// > lazy continuation (this results in strange indentation, but still works)
|
|
| +
|
|
|
|
error: aborting due to 6 previous errors
|
|
|