Similar to the case in #4164:
rustup update fails (unrelated to issue)

rustup target remove wasm32-wasi fails

rustup +target remove wasm32-wasi succeeds, as the default toolchain was nightly as specified in .rustup/settings.toml
... however the related error kind is RustupError::UnknownComponents which would be emitted during both rustup component add and rustup component rm (instead of the rustup target rm command shown above):
|
#[error("{}", unknown_components_msg(.desc, .components))] |
|
UnknownComponents { |
|
desc: ToolchainDesc, |
|
components: Vec<UnknownComponentInfo>, |
|
}, |
... so we should be smarter in terms of suggestions. Or, as a simplification, if suggesting rustup component add turns out to be non trivial, we can do the rustup component rm case first.
Similar to the case in #4164:
... however the related error kind is
RustupError::UnknownComponentswhich would be emitted during bothrustup component addandrustup component rm(instead of therustup target rmcommand shown above):rustup/src/errors.rs
Lines 141 to 145 in 2919b80
... so we should be smarter in terms of suggestions. Or, as a simplification, if suggesting
rustup component addturns out to be non trivial, we can do therustup component rmcase first.