4 ms·
FYI, if you're on MacOS at least, `rustfmt` looks like it's still under the `rustfmt-preview` name in `rustup components list`. Running `rustup component add ru
by Twisol 8y ago
FYI, if you're on MacOS at least, `rustfmt` looks like it's still under the `rustfmt-preview` name in `rustup components list`. Running `rustup component add rustfmt` (as in the official announcement post) gives an error:
> rustup component add rustfmt
error: toolchain 'stable-x86_64-apple-darwin' does not contain component 'rustfmt' for target 'x86_64-apple-darwin'
- steveklabnik 8y agoApparently you need to `rustup self update` before installing this version, and it will work. So if you've installed it, uninstall it, then update rustup, then reinstall it. Sorry about that! There was a miscommunication...
- Twisol 8y ago(EDIT: I fixed this by reading Steve's comment more carefully. Uninstalling `stable` and reinstalling it again made `rustfmt` available.) I'm still seeing the same behavior, even after following these directions. > rustup self update info: checking for self-updates > rustup --version rustup 1.15.0 (f0a3d9a84 2018-11-27) Thanks for looking into this, though :)
- Twisol 8y agoAhh, you meant to reinstall this version of Rust, not rustfmt. I did that and it worked -- the components list contains `rustfmt` properly, not `rustfmt-preview`. Thanks!
- steveklabnik 8y agoAh great!
- doodpants 8y agoI'm seeing the same problem on Windows: $ rustup component add rustfmt error: toolchain 'stable-x86_64-pc-windows-msvc' does not contain component 'rustfmt' for target 'x86_64-pc-windows-msvc' I looked for how to uninstall rust, and found that "the book" says that the command 'rustup self uninstall' will uninstall both rust and rustup. So I figured, what the heck, I'll start from scratch. I ran this command, uninstalling everything. Then I re-downloaded rustup-init.exe, and then ran it, reinstalling rust. I even then did 'rustup self update' and 'rustup update' for good measure. I still get the same error when trying to install rustfmt. What else is there to do if completely uninstalling and reinstalling doesn't work?
- steveklabnik 8y agoTheres a bug! We’re working on it. I should have an update for you soon.
- doodpants 8y agoOk, thanks!
- steveklabnik 8y agoThis should be fixed now, please try again!
- doodpants 8y agoIt works! (After uninstalling, and then re-downloading and running rustup-init.exe)