RS.CLIPPY.DOC_LAZY_CONTINUATION
Require every line of a paragraph to be indented and marked
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: doc_lazy_continuation. Copyright ©2025 The Rust Team. All rights reserved.
What it does
In CommonMark Markdown, the language used to write doc comments, a paragraph nested within a list or block quote does not need any line after the first one to be indented or marked. The specification calls this a "lazy paragraph continuation."
Why is this bad?
This is easy to write but hard to read. Lazy continuations makes unintended markers hard to see, and make it harder to deduce the document's intended structure.
Example
This table is probably intended to have two rows, but it does not. It has zero rows, and is followed by a block quote.
/// Range | Description
/// ----- | -----------
/// >= 1 | fully opaque
/// < 1 | partially see-through
fn set_opacity(opacity: f32) {}
Fix it by escaping the marker:
/// Range | Description
/// ----- | -----------
/// \\>= 1 | fully opaque
/// < 1 | partially see-through
fn set_opacity(opacity: f32) {}
This example is actually intended to be a list:
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
/// it should be done right now.
Fix it by indenting the list contents:
/// * Do nothing.
/// * Then do something. Whatever it is needs done,
/// it should be done right now.