You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustfmt prints "rewriting static" in its output #6210
Commit 30cdc2b from #6204 included what looks like a debugging println! that causes rustfmt to generate invalid rust code. I don't have a minimal test case, but it's causing failures in combination with bindgen in at least 3 other crates.
Downstream bug: rust-lang/rust#126887
I've put up a fix in-tree in rust-lang/rust rust-lang/rust#126888 which can later get subtree-sync'd here. @calebcartwright@ytmimi i'm happy to perform the rust->rustfmt subtree sync to pull this in if you'd like.
Definitely agreed with getting the fix in directly. If you're up for doing a subtree push to bring that over here then that's helpful as well (though not urgent nor impactful on this side)
certainly an option, although we don't regularly run clippy on this repo and don't gate CI on a passing clippy check
i'm also surprised that this didn't cause any test failures. if the issue was only reproducible when running rustfmt with stdin/stdout (which is how RA internally uses rustfmt) then that would explain the lack of test failures, but if it was reproducible via standard rustfmt execution against a file then i'm really puzzled how there wasn't mass failure of tests
i'm also surprised that this didn't cause any test failures. if the issue was only reproducible when running rustfmt with stdin/stdout (which is how RA internally uses rustfmt) then that would explain the lack of test failures, but if it was reproducible via standard rustfmt execution against a file then i'm really puzzled how there wasn't mass failure of tests
In standard rustfmt execution, the message appears in the terminal but not in the file. So it doesn't break anything.
Activity
compiler-errors commentedon Jun 24, 2024
I've put up a fix in-tree in rust-lang/rust rust-lang/rust#126888 which can later get subtree-sync'd here. @calebcartwright @ytmimi i'm happy to perform the rust->rustfmt subtree sync to pull this in if you'd like.
calebcartwright commentedon Jun 24, 2024
Definitely agreed with getting the fix in directly. If you're up for doing a subtree push to bring that over here then that's helpful as well (though not urgent nor impactful on this side)
compiler-errors commentedon Jun 24, 2024
Cool, I can do a push tomorrow when this lands.
Rollup merge of rust-lang#126888 - compiler-errors:oops-debug-printin…
Unrolled build for rust-lang#126888
build: Don't rustfmt bindings
rami3l commentedon Jun 24, 2024
@calebcartwright Maybe adding some
disallowedrules (https://rust-lang.github.io/rust-clippy/master/#/disallowed) will prevent this from happening again?calebcartwright commentedon Jun 24, 2024
rust-lang/rust#126888 landed but I guess github won't close cross-repo issues still
this issue is resolved (and should only exist in a single nightly release), and there's no additional action to take here so i'm going to close
calebcartwright commentedon Jun 24, 2024
certainly an option, although we don't regularly run clippy on this repo and don't gate CI on a passing clippy check
i'm also surprised that this didn't cause any test failures. if the issue was only reproducible when running rustfmt with stdin/stdout (which is how RA internally uses rustfmt) then that would explain the lack of test failures, but if it was reproducible via standard rustfmt execution against a file then i'm really puzzled how there wasn't mass failure of tests
format safety keywords on static items
RalfJung commentedon Jun 24, 2024
In standard rustfmt execution, the message appears in the terminal but not in the file. So it doesn't break anything.
Rollup merge of #126888 - compiler-errors:oops-debug-printing, r=dtolnay
robertbastian commentedon Jun 25, 2024
I don't see stdin documented by
rustfmt --help. Is this not something that is meant to be public?One day more to fix a bug
calebcartwright commentedon Jun 26, 2024
You're right that's not explicitly clear in the help text, but it's also not something that's intended to be a secret: https://github.com/rust-lang/rustfmt?tab=readme-ov-file#running-rustfmt-directly
tooling: update rust nightly version