Rustfmt old version causing trouble

I installed rustfmt via rustup. It is stuck at 0.10. I cannot seem to remove it or update it.
rustfmt --force -V >>0.10.0 ( ) DEPRECATED: use rustfmt-nightly
rustup component remove rustfmt >> info: removing component 'rustfmt'
rustfmt --force -V >>0.10.0 ( ) DEPRECATED: use rustfmt-nightly

Rustup is version 1.18.3-1.

This was apparently caused by the installation method I used for rustup via the Arch repository package. Uninstalling that and then installing via

curl -sSf | sh

seems to have resolved the issue. The main problem was that I had ALE set to run fixers on save and the rustfmt error was going to stdout and overwriting my files in vim. This is mostly a PSA for anyone who installed via Arch, though I welcome anyone who can point me to a different reason for my problem.

Anyone else encountering this, it's a good idea to check where the binary is located by running

which rustfmt

If the answer is in /usr/bin on Linux, that's not the rustup version!

Let's not jump to conclusions!

$ grep PRETTY /etc/os-release
PRETTY_NAME="Arch Linux"
$ pacman -Ss rustup
community/rustup 1.18.3-1 [installed]
    The Rust toolchain installer
$ which rustfmt
$ rustfmt --version
rustfmt 1.3.0-nightly (d334502 2019-06-09)
$ rustfmt +beta --version      # only the rustup version can do this!!
rustfmt 1.0.1-beta (be13559 2018-12-10)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.