Cargo fmt and rustfmt started doing nothing on my machine

I have this occasional problem where cargo fmt and rustfmt just stop... doing anything. Like, I'll run cargo fmt against a branch that I know has formatting issues, and nothing will change. If I run cargo fmt -- --check, it returns 0. If I run rustfmt directly, same result. Any idea what could be wrong? These tools have worked correctly on this machine in the past.

$ rustfmt --version
rustfmt 1.4.36-stable (7de6968 2021-02-07)
$ cargo --version
cargo 1.51.0 (43b129a20 2021-03-16)

rustup update fixed the problem for me! Should have thought of that before posting. :slight_smile:

In case anyone else needs more info: This was a bug in rustup 1.24.0, fixed in rustup 1.24.1:


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.