Closed
Description
Problem you are trying to solve
Rustup currently lets you do some silly things:
; rustup target list --installed
x86_64-unknown-linux-gnu
; rustup target remove x86_64-unknown-linux-gnu
info: removing component 'rust-std'
; cargo build
Compiling inner v0.1.0 (/home/jyn/src/example/inner)
error[E0463]: can't find crate for `std`
This isn't a bug, but it seems ... confusing.
Solution you'd like
I think rustup should warn in either of the following cases:
- If you're trying to remove the host target, which means you can no longer build proc-macros or build scripts
- If you're trying to remove the last remaining target installed
- If you're uninstalling the active/default toolchain
Notes
No response
### Tasks
- [ ] https://github.com/rust-lang/rustup/pull/3637
- [ ] https://github.com/rust-lang/rustup/pull/3924