Skip to content

Rustdoc ignores a newline in one-line doc comments #5838

Closed
@lifthrasiir

Description

@lifthrasiir

Paraphrased from my earlier post. Given the following code:

/// This is a doc comment with two paragraphs.
///
/// Not actually.
pub fn a() {
}

/**
 * This is a doc comment with two paragraphs.
 *
 * Really.
 */
pub fn b() {
}

...rustdoc produces two paragraphs for b but one paragraph for a (behaves as if there are no empty lines). I have assumed that it was by design until now, but @brson considered it to be a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions