diff options
author | David Tolnay <dtolnay@chromium.org> | 2018-11-16 14:08:13 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-20 05:52:35 -0800 |
commit | 298cf591ac543256d345ba26502a78d934013b42 (patch) | |
tree | 4747d34a34ca3afcb7730ed733884ddea9736433 /rust-toolchain | |
parent | e13b180f74ad6d0b1cb1db2a198e294da97e526c (diff) | |
download | crosvm-298cf591ac543256d345ba26502a78d934013b42.tar crosvm-298cf591ac543256d345ba26502a78d934013b42.tar.gz crosvm-298cf591ac543256d345ba26502a78d934013b42.tar.bz2 crosvm-298cf591ac543256d345ba26502a78d934013b42.tar.lz crosvm-298cf591ac543256d345ba26502a78d934013b42.tar.xz crosvm-298cf591ac543256d345ba26502a78d934013b42.tar.zst crosvm-298cf591ac543256d345ba26502a78d934013b42.zip |
toolchain: Add rust-toolchain file
The rust-toolchain file defines a local toolchain override that is respected by rustup when running Cargo commands. This override applies to the directory containing the rust-toolchain file as well as its subdirectories. It makes it so that running `cargo check` or `cargo fmt` always uses the intended toolchain, unless overridden by e.g. `cargo +nightly check`, regardless of what toolchain the user has selected as global default. No more accidentally running a too new or old version of rustfmt! We will need to bump this version number when rolling to a newer toolchain in ebuild. When that happens, local Cargo commands by other crosvm developers will automatically download the new toolchain. For details on rust-toolchain: https://github.com/rust-lang-nursery/rustup.rs#the-toolchain-file https://github.com/rust-lang-nursery/rustup.rs#override-precedence This file is ignored during emerge. Verified by setting rust-toolchain to a bogus version number and emerge succeeded anyway. TEST=rustc --version TEST=rustc +nightly --version TEST=cargo check TEST=cargo fmt --all TEST=cargo +nightly check TEST=build_packages Change-Id: Ia4d74a0c8c632bcd7b171f6c039b068fb30b5502 Reviewed-on: https://chromium-review.googlesource.com/1340728 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'rust-toolchain')
-rw-r--r-- | rust-toolchain | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..034552a --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.30.0 |