Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant