-
Notifications
You must be signed in to change notification settings - Fork 898
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
normalize_comments = true
de-normalizes some comments
#4909
Comments
* feat: rustfmt.toml Copied from substrate. * avoid normalize It has some odd side effects converting // to /* */ instead of the other way round. See rust-lang/rustfmt#4909 .
Thanks for the report. This is technically a duplicate of a similar report added in a comment in #3350, but better to have a dedicated issue for it any way |
I just hit this when commenting out a field in a struct definition, but I haven't even set
comment_width = 100
imports_granularity = "Crate"
newline_style = "Unix"
use_small_heuristics = "Max"
wrap_comments = true |
I'm also seeing this, regardless of the setting it converts a series of line comments to one block comment, with no ability to disable it. It's very annoying since I commonly comment and uncomment lines (say, benchmarks or parts of tests as I'm working on things) using a vim extension but it doesn't properly work with block comments. Rust is the only language where the formatter gets in the way like this. |
According to https://rust-lang.github.io/rustfmt/?version=v1.4.36&search=#normalize_comments should convert
/* yada */
to// yada
, but the inverse happens.# rustfmt +nightly --version rustfmt 1.4.37-nightly (d2b04f0 2021-07-07)
results in a delta of
The text was updated successfully, but these errors were encountered: