Component `rustfmt` is missing from 1.31.0?


#1

Hi! Blog post suggests that on 1.31 I can do rustup component add rustfmt, but apparently that does not work:

λ rustup component add rustfmt
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'

rustfmt-preview works though!


#2

You may need to rustup self update first.


#3

That apparently does not help

λ rustup --version
rustup 1.15.0 (f0a3d9a84 2018-11-27)

~/projects/cargo update-dry-run*
λ rustup self update
info: checking for self-updates

~/projects/cargo update-dry-run*
λ rustc --version
rustc 1.31.0 (abe02cefd 2018-12-04)

~/projects/cargo update-dry-run*
λ rustup component add rustfmt
error: toolchain 'stable-x86_64-unknown-linux-gnu' does not contain component 'rustfmt' for target 'x86_64-unknown-linux-gnu'

#4

Some folks on reddit have a similar problem: https://www.reddit.com/r/rust/comments/a3pyrw/announcing_rust_131_and_rust_2018/eb89pna/


#5

I had a similar problem: I already had the rustfmt-preview component installed, rustup wouldn’t let me update nightly until I uninstalled that component.