Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
lifthrasiir opened this issue Apr 11, 2013 · 0 comments
Closed

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

lifthrasiir opened this issue Apr 11, 2013 · 0 comments

Comments

@lifthrasiir
Copy link
Contributor

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.

calebcartwright pushed a commit to calebcartwright/rust that referenced this issue Oct 23, 2023
…g#5838)

Update docs to include an example of running `rustfmt` built from src,
and show how users can set the `RUSTFMT` environment variable to test
`cargo-fmt` using the `rustfmt` they built from src.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant