Open
Description
$ rustup update nightly
$ cd .rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin
$ ./cargo-fmt --version
rustfmt 1.8.0-stable (4d91de4e48 2025-02-17)
$ ./rustfmt --version
rustfmt 1.8.0-nightly (85abb27636 2025-02-25)
The version has a different date than rustfmt
, which I would perhaps understand, but it's a bit weird that it says -stable
even though it's in the nightly toolchain.
It's possible that #137541 might fix this, we'll see after the next nightly is released.
Activity
tool::CargoClippy
andtool::Cargofmt
binary to target sysroot #137541onur-ozkan commentedon Feb 26, 2025
I did a quick check, #137541 doesn't fix this.
onur-ozkan commentedon Feb 26, 2025
Clippy doesn't have this problem. Since both tools share common implementations I assume there might be some internal logic in
src/tools/rustfmt
.xizheyin commentedon Mar 6, 2025
It has been fixed?
Kobzol commentedon Mar 6, 2025
I still see this:
xizheyin commentedon Mar 6, 2025
Try to update the nightly?
rustup toolchain update nightly
It seems to be old version nightly.
Kobzol commentedon Mar 6, 2025
No it is updated :) That's why it's super weird. I also removed the toolchain and reinstalled it.
I even tried a pinned nightly (2025-03-01) which doesn't have any extra components, where the same thing happens.
xizheyin commentedon Mar 6, 2025
The code is here. It seems that
RUSTFMT
is incorrect.onur-ozkan commentedon May 15, 2025
I tried it just now and it seems to be working as expected:
Kobzol commentedon May 15, 2025
Not sure why is there a difference between your and my environment :/
onur-ozkan commentedon May 15, 2025
lol this is weird
rustfmt
incargo-fmt
#141100onur-ozkan commentedon May 16, 2025
I found the problem and explained it in the fix PR.