Repository navigation
refactor(toolchain): clean up toolchain hierarchy, pt. 3 - #5224
Merged
rami3l merged 6 commits intoNov 18, 2026
Merged
Conversation
rami3l
force-pushed
the
refactor/maybe-toolchain-name-cli-only
branch
3 times, most recently
from
November 17, 2026 11:54
be53ce4 to
bf5c41f
Compare
rami3l
marked this pull request as ready for review
November 17, 2026 13:36
rami3l
force-pushed
the
refactor/maybe-toolchain-name-cli-only
branch
from
November 17, 2026 14:27
bf5c41f to
d5e9447
Compare
djc
approved these changes
Nov 18, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change suppresses active-override reporting when unsetting the default and alters alias parsing so default/ can select the wrong toolchain or fail.
2 open issues
What changed in this PR
Continues #5092 by moving default-selection helpers from the shared toolchain hierarchy into the CLI modules that use them.
Changes:
- Replaces
Maybe*ToolchainNametypes with CLI-localDefaultToolchainandDefaultChannelToolchainhelpers. - Updates default-command handling and installer selection to use the new types.
- Removes obsolete exports and renames the default-toolchain help helper.
| File | Description |
|---|---|
src/toolchain/names.rs |
Removes the two default-selection wrapper types. |
src/toolchain.rs |
Removes exports of the obsolete types. |
src/cli/setup_mode.rs |
Uses the new installer default-selection type. |
src/cli/self_update.rs |
Defines DefaultChannelToolchain and updates installer handling. |
src/cli/rustup_mode.rs |
Defines DefaultToolchain and restructures default-command handling. |
src/cli/help.rs |
Renames the default-toolchain argument help helper. |
Review effort: Balanced
rami3l
force-pushed
the
refactor/maybe-toolchain-name-cli-only
branch
from
November 18, 2026 13:36
d5e9447 to
ee67dbb
Compare
… to `default_toolchain_arg_help()`
rami3l
force-pushed
the
refactor/maybe-toolchain-name-cli-only
branch
from
November 18, 2026 13:43
ee67dbb to
cd7d22f
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of #5092.
The main changes of this PR is that
Maybe*ToolchainNametypes have been replaced with new local helper types inmod cli: they are not used outside of default toolchain assignments, somod toolchain::namesis probably not the suitable place for them.In addition, the new names
Default[Channel]Toolchainmake it clear that they are purely for default toolchain selection.