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

format_code_in_doc_comments insert extra line with trailing whitespaces if there there's a comment and a hash #6016

Open
stepancheg opened this issue Jan 10, 2024 · 1 comment
Labels
a-comments e-trailing whitespace error[internal]: left behind trailing whitespace only-with-option requires a non-default option value to reproduce

Comments

@stepancheg
Copy link
Contributor

Input:

//! Test test
//!
//! ```
//! # fn main() {
//! println!("hello"); // Comment
//! # }
//! ```

mod arena;
rustfmt +nightly --config format_code_in_doc_comments=true

outputs:

//! Test test
//!
//! ```
//! # fn main() {
//! println!("hello"); // Comment
//!<5 SPACES>
//! # }
//! ```

mod arena;
image
rustfmt 1.7.0-nightly (ca663b06 2024-01-08)
@ytmimi ytmimi added a-comments only-with-option requires a non-default option value to reproduce e-trailing whitespace error[internal]: left behind trailing whitespace labels Jan 10, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Jan 10, 2024

Thanks for the report. Linking tracking issue for format_code_in_doc_comments #3348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments e-trailing whitespace error[internal]: left behind trailing whitespace only-with-option requires a non-default option value to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants