Skip to content

Suggest alternative toolchains for unavailable targets - #5094

Open
Sreehari425 wants to merge 1 commit into
rust-lang:mainfrom
Sreehari425:rustup-msg
Open

Sreehari425 wants to merge 1 commit into
rust-lang:mainfrom
Sreehari425:rustup-msg

Conversation

@Sreehari425

Copy link
Copy Markdown
Contributor

Closes #4164

rustup target remove <target> now suggests another installed toolchain when the target isn't available in the current one. If no other toolchain has the target, the existing error is unchanged.

Comment thread src/toolchain/distributable.rs Outdated
Comment thread src/errors.rs Outdated
}
}

fn find_toolchain_with_target(&self, target: &TargetTuple) -> Option<String> {

@Cloud0310 Cloud0310 Sep 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept this as a separate helper even though it’s only used here, since I felt moving the toolchain lookup out of remove_components made the function a bit easier to read.

Comment thread src/toolchain/distributable.rs Outdated
@Sreehari425
Sreehari425 force-pushed the rustup-msg branch 3 times, most recently from c2597ac to 3d12360 Compare September 19, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggest another toolchain when removing a component/target unavailable to the current toolchain

2 participants