Skip to content

Commit abf9bce

Browse files
author
Jon Gjengset
committed
Document path toolchain override
1 parent 32ca04e commit abf9bce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/src/overrides.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ a directory, the latter is used for backwards compatibility. The files use the
8383
``` toml
8484
[toolchain]
8585
channel = "nightly-2020-07-10"
86+
# or
87+
path = "/path/to/local/toolchain"
88+
8689
components = [ "rustfmt", "rustc-dev" ]
8790
targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
8891
profile = "minimal"
8992
```
9093

9194
The `[toolchain]` section is mandatory, and at least one property must be
92-
specified.
95+
specified. `channel` and `path` are mutually exclusive.
9396

9497
For backwards compatibility, `rust-toolchain` files also support a legacy
9598
format that only contains a toolchain name without any TOML encoding, e.g.
@@ -104,7 +107,9 @@ The toolchains named in these files have a more restricted form than `rustup`
104107
toolchains generally, and may only contain the names of the three release
105108
channels, 'stable', 'beta', 'nightly', Rust version numbers, like '1.0.0', and
106109
optionally an archive date, like 'nightly-2017-01-01'. They may not name
107-
custom toolchains, nor host-specific toolchains.
110+
custom toolchains, nor host-specific toolchains, except by giving the
111+
`path` to said toolchain directly. A relative `path` is resolved
112+
relative to the location of the `rust-toolchain.toml` file.
108113

109114
## Default toolchain
110115

0 commit comments

Comments
 (0)