-
Notifications
You must be signed in to change notification settings - Fork 894
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
Is "Overrides" section of "The rustup book" correct? #4150
Comments
@smoelius Hmmm, just tried this on my machine: > rustup --version
rustup 1.28.0 :: 1.27.1+556 (568c482a6 2025-01-07)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.84.0 (9fc6b4312 2025-01-07)` > RUSTUP_TOOLCHAIN=nightly rustup show
Default host: aarch64-apple-darwin
rustup home: /Users/rami3l/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin (active)
nightly-2023-09-30-aarch64-apple-darwin
active toolchain
----------------
name: nightly-aarch64-apple-darwin
active because: overridden by environment variable RUSTUP_TOOLCHAIN
installed targets:
aarch64-apple-darwin > RUSTUP_TOOLCHAIN=nightly rustup +stable show
Default host: aarch64-apple-darwin
rustup home: /Users/rami3l/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (active, default)
nightly-aarch64-apple-darwin
nightly-2023-09-30-aarch64-apple-darwin
active toolchain
----------------
name: stable-aarch64-apple-darwin
active because: overridden by +toolchain on the command line
installed targets:
aarch64-apple-darwin ... same thing for I'm not sure if I have changed this behavior or anything... 🤔 Lines 528 to 557 in 6fa21c2
|
Thanks very much for your reply, @rami3l. Regarding this test: RUSTUP_TOOLCHAIN=nightly rustup +stable show I get different results between stable and master. In brief, the "The rustup book" seems to describe master's behavior, but not stable's. Here is what I see in more detail:
|
So if the rustup book indeed documents the |
@djc @smoelius I just checked the blame of that page; it came from over 4 years ago without any changes. If anything, I believe this is a fixed regression instead of a breakage. |
Hah, fair enough. |
The "Overrides" section of "The rustup book" says that shorthand notation should have the highest priority. However, my experiments suggest
RUSTUP_TOOLCHAIN
has higher priority.I created this program, which I called
a
:Running it with
target/debug/a
, I see this:However, running it with
RUSTUP_TOOLCHAIN=stable target/debug/a
, I see this:Am I doing something wrong? Or have I misinterpreted the docs?
The text was updated successfully, but these errors were encountered: