Skip to content

Trying to use a component that is not installed runs for about a second before reporting an error #4355

Open
@saethlin

Description

@saethlin

Verification

Problem

I run into this all the time because my editor runs rustfmt --version on save to initialize the rust.vim extension's rustfmt support. If I am in a project that has set a toolchain override that doesn't have rustfmt, this makes vim hang for a second when I try to write-quit.

Steps

$ rustup component remove rustfmt
$ time rustfmt

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.28.2 (e4f3ad6f8 2025-04-28)

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/ben/.rustup

installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (active, default)
nightly-2025-05-22-x86_64-unknown-linux-gnu
nightly-2025-05-23-x86_64-unknown-linux-gnu
0c33fe2c3d3eecadd17a84b110bb067288a64f1c
2d5ffc513f1c56b7bc95bacb2519705096e8cc2b
45b94dd98018f2609b43a8d8e08ec5432b9e0647
55dc6112586ae887a7811648b0a8a05e1ac90162
6e23095adf9209614a45f7f75fea36dad7b92afb
8c46fcbb191b4a054f15dac8d411078faa679379
master-stage1
miri
stage1
stage2

active toolchain
----------------
name: nightly-x86_64-unknown-linux-gnu
active because: it's the default toolchain
installed targets:
  x86_64-unknown-linux-gnu

OS version

Linux archlinux 6.14.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:15 +0000 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions