Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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