Skip to content

Allow omitting patch version in toolchain specifiers #794

Closed
@kamalmarhubi

Description

@kamalmarhubi

Example use cases:

Installation / update

$ rustup install 1.8
error: toolchain '1.8' is not installed

(I've filed #793 for the confusing error message.)

I think this should install the highest version matching semver requirement ~1.8. For the recent case of 1.12.1, installing 1.12 should therefore install 1.12.1. 1.12.1 should be installed even if the user has 1.12.0 installed.

Run

$ rustup run 1.8 rustc test.rs
error: toolchain '1.8' is not installed

This should be equivalent to specifying the highest installed version matching ~1.8. In this case, I expect it to be equivalent to rustup run 1.8.0 cargo test.

For 1.12, if the user has 1.12.0 installed, then

$ rustup run 1.12 rustc test.rs

should run with 1.12.0, but if they have 1.12.1 installed, it should run with 1.12.1.

Together with #792, this leads to really confusing behavior: rustup run 1.8 cargo test will silently use nightly, since even if you have 1.8.0 installed, that's not 1.8.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions