-
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
duplicating where
clauses that contains (unused) braces
#5691
Comments
Thank you for the fix. When is this likely to be in I'm on Manjaro/Arch Linux x64, using
But, when I run |
And, while we're on it, and if you happen to know: |
@peter-kehl rustfmt is incorporated into the You can try to install rustfmt from source, but be aware that you'll need to build rustfmt with the nightly compiler version listed in rustfmt's rust-toolchain file, and you'll also need to have the
Unfortunately I don't know how to help with |
Thank you. All fine. Take care. |
This affects very specialized and a few months outdated codebases that
#[allow(unused_braces)]
(before it was recently lifted) to invoke macros fromwhere
clauses, andstruct
orenum
definition.Hence likely to be a lower priority. But I'm reporting this in case it's connected to any other/potential bigger issues.
Run
cargo fmt
from recentnightly
(noticed withnightly
as of Feb 2, 2023, chances are the problem existed before; the bug still exists as of Feb 15, 2023) on a project withlib.rs
containing the following (which does compile; or get the code from https://github.com/peter-kehl/fmt_bug_where_braces):That injects an extra line
num_slots!(C) }]:, {
, which makes the project not compile anymore:(Initially reported as rust-lang/rust#107610. The source that triggered the bug is not a part of rust-lang/rust itself, but it's from my experimentation.)
The text was updated successfully, but these errors were encountered: