rust-clippy/tests/ui/doc/doc_lazy_list.stderr
Michael Howell 6de87829da doc_lazy_continuation: blank comment line for gap
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
2024-06-27 17:09:54 -07:00

139 lines
3.6 KiB
Text

error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:4:5
|
LL | /// lazy continuation
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
|
LL | /// lazy continuation
| +++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:9:5
|
LL | /// lazy list continuations don't make warnings with this lint
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// lazy list continuations don't make warnings with this lint
| +++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:11:5
|
LL | /// because they don't have the
| ^
|
= help: if this is intended to be part of the list, indent 3 spaces
help: if this should be its own paragraph, add a blank doc comment line
|
LL ~ /// lazy list continuations don't make warnings with this lint
LL + ///
|
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:16:5
|
LL | /// lazy continuation
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// lazy continuation
| ++++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:21:5
|
LL | /// lazy list continuations don't make warnings with this lint
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// lazy list continuations don't make warnings with this lint
| ++++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:23:5
|
LL | /// because they don't have the
| ^
|
= help: if this is intended to be part of the list, indent 4 spaces
help: if this should be its own paragraph, add a blank doc comment line
|
LL ~ /// lazy list continuations don't make warnings with this lint
LL + ///
|
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:28:5
|
LL | /// lazy continuation
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// lazy continuation
| ++++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:33:5
|
LL | /// this will warn on the lazy continuation
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// this will warn on the lazy continuation
| ++++++
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:35:5
|
LL | /// and so should this
| ^^^^
|
= help: if this is intended to be part of the list, indent 2 spaces
help: if this should be its own paragraph, add a blank doc comment line
|
LL ~ /// this will warn on the lazy continuation
LL + ///
|
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:56:5
|
LL | /// 'protocol_descriptors': [
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// 'protocol_descriptors': [
| +
error: doc list item without indentation
--> tests/ui/doc/doc_lazy_list.rs:75:5
|
LL | /// ]
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
help: indent this line
|
LL | /// ]
| +
error: aborting due to 11 previous errors