Problem
The live documentation says it should be possible to use a rust-toolchain.toml file, however it seems that was only added in #2653 which is more recent than the latest release.
Steps
Check the version of rustup installed
PS D:\> rustup --version
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.51.0 (2fd73fabe 2021-03-23)`
Create a new project and create a rust-toolchain.toml file with a nightly toolchain:
PS D:\> cargo new dir; cd dir
Created binary (application) `dir` package
PS D:\dir> Set-Content -Path rust-toolchain.toml -Value "[toolchain]`nchannel = `"nightly`"`n"
PS D:\dir> Get-Content .\rust-toolchain.toml
[toolchain]
channel = "nightly"
Sanity check there is no rust-toolchain file:
PS D:\dir> Test-Path -Path rust-toolchain
False
Check which toolchain rustup recognises as active. Note that it is not the toolchain listed in the rust-toolchain.toml file we just created:
PS D:\dir> rustup show
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\Nick\.rustup
installed toolchains
--------------------
stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.51.0 (2fd73fabe 2021-03-23)
Rustup does set the correct toolchain if we use a rust-toolchain file instead of the .toml file:
PS D:\dir> Set-Content -Path rust-toolchain -Value "[toolchain]`nchannel = `"nightly`"`n"
PS D:\dir> Test-Path -Path rust-toolchain
True
PS D:\dir> rustup show
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\Nick\.rustup
installed toolchains
--------------------
stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc
active toolchain
----------------
nightly-x86_64-pc-windows-msvc (overridden by '\\?\D:\dir\rust-toolchain')
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
Possible Solution(s)
Either bring the documentation in line with the behaviour of rustup, or bring rustup in line with the documentation.
Note: #2665 mentions that only changes to documentation on the stable branch should be live (linked to from rustup.rs), so perhaps the documentation on the stable branch could be kept in line with the latest release?
Problem
The live documentation says it should be possible to use a
rust-toolchain.tomlfile, however it seems that was only added in #2653 which is more recent than the latest release.Steps
Check the version of rustup installed
Create a new project and create a
rust-toolchain.tomlfile with a nightly toolchain:Sanity check there is no
rust-toolchainfile:Check which toolchain rustup recognises as active. Note that it is not the toolchain listed in the
rust-toolchain.tomlfile we just created:Rustup does set the correct toolchain if we use a
rust-toolchainfile instead of the.tomlfile:Possible Solution(s)
Either bring the documentation in line with the behaviour of rustup, or bring rustup in line with the documentation.
Note: #2665 mentions that only changes to documentation on the stable branch should be live (linked to from rustup.rs), so perhaps the documentation on the stable branch could be kept in line with the latest release?