Skip to content

feat(config)!: use unqualified names for default_toolchain - #4947

Open
rami3l wants to merge 4 commits into
rust-lang:mainfrom
rami3l:feat/unqualified-default-toolchain
Open

feat(config)!: use unqualified names for default_toolchain#4947
rami3l wants to merge 4 commits into
rust-lang:mainfrom
rami3l:feat/unqualified-default-toolchain

Conversation

@rami3l

@rami3l rami3l commented Jul 9, 2026

Copy link
Copy Markdown
Member

Stacked on #4950, closes #4945.

The breakage should be minimal anyway because the default host tuple almost never changes.

@rami3l rami3l changed the title refactor(config): extract Cfg::get_default_resolvable() feat(config)!: use unqualified names for default_toolchain Jul 9, 2026
Comment thread src/cli/self_update.rs Outdated
Comment thread src/cli/self_update.rs Outdated
@rami3l
rami3l force-pushed the feat/unqualified-default-toolchain branch 2 times, most recently from 1d2c5c6 to 108ca96 Compare July 14, 2026 19:51
@rustbot

This comment has been minimized.

@rami3l
rami3l force-pushed the feat/unqualified-default-toolchain branch 5 times, most recently from 37bfef2 to 8975942 Compare July 23, 2026 09:14
@rustbot

This comment has been minimized.

@rami3l
rami3l force-pushed the feat/unqualified-default-toolchain branch from 8975942 to bb5bf44 Compare July 23, 2026 10:51
Comment thread src/cli/self_update.rs
Comment thread src/cli/self_update.rs
@rami3l
rami3l force-pushed the feat/unqualified-default-toolchain branch from bb5bf44 to 9f1d12c Compare July 25, 2026 08:14
@rami3l
rami3l marked this pull request as ready for review July 27, 2026 08:33
@rami3l
rami3l force-pushed the feat/unqualified-default-toolchain branch from 9f1d12c to 5616ba4 Compare July 27, 2026 08:33
@rustbot

rustbot commented Jul 27, 2026

Copy link
Copy Markdown
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.

@rami3l
rami3l requested a review from djc July 27, 2026 08:37
Comment thread src/config.rs
Ok(Some(toolchain.resolve(&self.default_host_tuple()?)?))
}

/// Gets the configured default toolchain.

@djc djc Jul 28, 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.

Nit: documentation comment style.

Also, duplicating the documentation comment from get_default() seems pretty unhelpful. Ideally these documentation comments should tell a clear story about the difference and their interaction.

View changes since the review

Comment thread src/toolchain/names.rs
CustomToolchainName,
ResolvableToolchainName,
ResolvableToolchainName::Custom
);

@djc djc Jul 28, 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.

I'm not a fan of these macros and have looked several times at cleaning them up. How about just writing them out (could inline macros with Rust-Analyzer I think)?

View changes since the review

Comment thread src/cli/self_update.rs
Some(toolchain_name)
}
None => match cfg.get_default()? {
None => match cfg.get_default_resolvable()? {

@djc djc Jul 28, 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.

Does get_default() go unused? Where is it still used after this?

View changes since the review

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.

Should default_toolchain in settings.toml allow unresolved names?

3 participants