Skip to content

Commit 84974df

Browse files
authored
Merge pull request #2697 from jstasiak/document-rust-toolchain-error
Document "invalid channel name '[toolchain]'" error
2 parents ca0b042 + f58a414 commit 84974df

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/src/overrides.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Overrides
1+
[[#]] Overrides
22

33
`rustup` automatically determines which [toolchain] to use when one of the
44
installed commands like `rustc` is executed. There are several ways to control
@@ -97,6 +97,16 @@ just `nightly-2021-01-21`. The file has to be encoded in US-ASCII this case
9797
(if you are on Windows, check the encoding and that it does not start with a
9898
BOM). The legacy format is not available in `rust-toolchain.toml` files.
9999

100+
If you see the following error (when running `rustc`, `cargo` or other command)
101+
102+
```
103+
error: invalid channel name '[toolchain]' in '/PATH/TO/DIRECTORY/rust-toolchain'
104+
```
105+
106+
it means you're running `rustup` pre-1.23.0 and trying to interact with a project
107+
that uses the new TOML encoding in the `rust-toolchain` file. You need to upgrade
108+
`rustup` to 1.23.0+.
109+
100110
The `rust-toolchain.toml`/`rust-toolchain` files are suitable to check in to
101111
source control.
102112

0 commit comments

Comments
 (0)