rust-lang / rust-lang/rust

`cargo-fmt` reports weird version on nightly

Open
#137,666 11 comments 0 reactions 1 assignee View on GitHub

@onur-ozkan is already working on this.

Since May 16, 2025.

C-bug T-rustfmt
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

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 https://github.com/rust-lang/rust/pull/137541 might fix this, we'll see after the next nightly is released.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.