Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust-toolchain: Support local toolchain names in the override file #2141

Merged

Conversation

kinnison
Copy link
Contributor

@kinnison kinnison commented Dec 3, 2019

The rust-toolchain override file was limited to valid toolchain
names. This commit weakens that slightly to permit any string so
long as it's a local toolchain name. If it's not then it has to
be a valid channelish toolchain name instead.

This fixes #1745

It's worth noting that @mikhail-krainik won't be able to commit such a file to git and expect that others will have it work out of the box unless they also have the exact toolchain they list in the file, or the name is a valid channel/version/channel+date.

The `rust-toolchain` override file was limited to valid toolchain
names.  This commit weakens that slightly to permit *any* string so
long as it's a local toolchain name.  If it's not then it has to
be a valid channelish toolchain name instead.

This fixes rust-lang#1745

Signed-off-by: Daniel Silverstone <[email protected]>
@kinnison kinnison added this to the 1.21.0 milestone Dec 3, 2019
@kinnison kinnison mentioned this pull request Dec 5, 2019
Copy link
Contributor

@SimonSapin SimonSapin left a comment

Choose a reason for hiding this comment

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

I’m not super familiar with rustup internals but this looks good to me.

I almost suggested using [_]::contains instead of Iterator::any, but that would require a &String argument instead of &str.

@kinnison kinnison merged commit 47ddb31 into rust-lang:master Dec 16, 2019
@kinnison kinnison deleted the kinnison/local-toolchains-in-override branch December 16, 2019 20:07
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.

invalid (valid) channel name in rust-toolchain
2 participants