-
Notifications
You must be signed in to change notification settings - Fork 995
Closed
Description
Problem
The section on rust-toolchain file doesn't say how to simply pick a channel using the file.
I found that simply the word nightly would work where the more verbose content:
[toolchain]
channel = "nightly"
did not work
Steps
cargo new foocd fooand create a file named rust-toolchain with the verbose content:
[toolchain]
channel = "nightly"
rustup show
Possible Solution(s)
Update the documentation with an example of using a channel name with no TOML markup
Using a channel (
stable,betaornightly) in a repository can be achieved by setting the content ofrust-toolchainto the name of the channel, without any additional TOML markup:
e.g. to use the latestnightlychannel,rust-toolchainshould only contain:nightly
Notes
Output of rustup --version:
rustup 1.22.1 (b01adbbc3 2020-07-08)
Output of rustup show:
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\masond\.rustup
(error: invalid channel name '[toolchain]' in '\\?\C:\Users\masond\code\rust\foo\rust-toolchain', invalid toolchain name: '[toolchain]')
Output of rustup update:
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: checking for self-updates
stable-x86_64-pc-windows-msvc unchanged - rustc 1.46.0 (04488afe3 2020-08-24)
nightly-x86_64-pc-windows-msvc unchanged - rustc 1.48.0-nightly (d006f5734 2020-08-28)