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

Indentation is broken for multiple line comments inside struct #4014

Closed
rhysd opened this issue Jan 14, 2020 · 0 comments · Fixed by #4058
Closed

Indentation is broken for multiple line comments inside struct #4014

rhysd opened this issue Jan 14, 2020 · 0 comments · Fixed by #4058
Labels
a-comments bug Panic, non-idempotency, invalid code, etc.

Comments

@rhysd
Copy link
Contributor

rhysd commented Jan 14, 2020

I'm not sure this is a bug or intended behavior. So if it is intended, please feel free to close this.

Environment

  • rustfmt: rustfmt 1.4.11-nightly (18382352 2019-12-03)
  • OS: macOS 10.14

Repro

Please prepare following code:

struct X {
    // foo
    // bar
}

and run rustfmt (here I'm using nightly):

$ rustup run nightly rustfmt blah.rs

Expected behavior

rustfmt changes nothing

Actual behavior

rustfmt changes code as follows:

struct X {
    // foo
// bar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-comments bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants