RS.CLIPPY.DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS

Double-space used for doc comment linebreak instead of `\\`

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_comment_double_space_linebreaks. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Detects doc comment linebreaks that use double spaces to separate lines, instead of back-slash (\\).

Why is this bad?

Double spaces, when used as doc comment linebreaks, can be difficult to see, and may accidentally be removed during automatic formatting or manual refactoring. The use of a back-slash (\\) is clearer in this regard.

Example

The two replacement dots in this example represent a double space.

/// This command takes two numbers as inputs and··
/// adds them together, and then returns the result.
fn add(l: i32, r: i32) -> i32 {
    l + r
}

Use instead:

/// This command takes two numbers as inputs and\\
/// adds them together, and then returns the result.
fn add(l: i32, r: i32) -> i32 {
    l + r
}