Repository navigation
refactor(toolchain): clean up toolchain hierarchy, pt. 2 - #5131
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
rami3l
force-pushed
the
refactor/toolchain-type-simp
branch
4 times, most recently
from
October 7, 2026 12:39
b80321f to
03fb4ca
Compare
rami3l
marked this pull request as ready for review
October 7, 2026 13:12
djc
approved these changes
Oct 8, 2026
rami3l
force-pushed
the
refactor/toolchain-type-simp
branch
from
October 8, 2026 09:07
03fb4ca to
23d4739
Compare
This comment has been minimized.
This comment has been minimized.
rami3l
force-pushed
the
refactor/toolchain-type-simp
branch
from
October 8, 2026 22:10
23d4739 to
76da643
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. |
djc
approved these changes
Oct 9, 2026
rami3l
force-pushed
the
refactor/toolchain-type-simp
branch
from
October 9, 2026 08:24
76da643 to
9d1a7b2
Compare
rami3l
enabled auto-merge
October 9, 2026 08:26
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 in this patch are:
This patch has created a new trait
ToolchainNameExtto accommodate the currentCfg::toolchain_path()andToolchain::exists()functions. The rationale is:implblocks, however they are intended for different types of the toolchain name layer, which has been a source of confusion for me.&ToolchainNameOrPathso values of other types would require a conversion to the former type first in order to to call these methods, which is not really necessary.DistributableToolchainhas been renamed toChannelToolchainto mirrorChannelToolchainNameas previously discussed here.ChannelToolchain::descfield has been removed, makingChannelToolchaina transparent newtype overToolchain. This is a more conservative version of the original plan1.mod toolchain::distributablehas been renamed tomod toolchain::channels.Footnotes
The original plan was to make the
Toolchaintype generic like so:struct Toolchain<'a, T: ToolchainNameExt = ToolchainNameOrPath>, so we can havetype ChannelToolchain<'a> = Toolchain<'a, ChannelToolchainName>. Although this is completely feasible, after some experiments, I think this is making rustc quite unhappy because it is requiring explicit type annotations everywhere onToolchain::new(), even when the originalToolchain::new()and the aliasedChannelToolchain::new()have completely incompatible output types. ↩