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

rustfmt report "rewriting static" #6213

Closed
Sherlock-Holo opened this issue Jun 24, 2024 · 3 comments
Closed

rustfmt report "rewriting static" #6213

Sherlock-Holo opened this issue Jun 24, 2024 · 3 comments

Comments

@Sherlock-Holo
Copy link

static A: i32 = 10;
static B: i32 = 10;

this codes has 2 static variables, then rustfmt --edition 2021 /tmp/ttt/aaa/src/lib.rs report

rewriting static
rewriting static

it looks like it reports rewriting static as many times as I have static variables

the rustfmt version is rustfmt 1.7.1-nightly (bcf94de 2024-06-23)

that didn't happen in previous version, such as rustfmt 1.7.0-nightly (c1b336c 2024-06-21)

also, use cargo fmt to format also has this problem

@djmitche
Copy link

https://github.com/rust-lang/rustfmt/issues/6213 / looks like a likely culprit.

@djmitche
Copy link

rust-lang/rust#126888 fixes

@calebcartwright
Copy link
Member

duplicate of #6210

@calebcartwright calebcartwright closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
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

3 participants