From 298cf591ac543256d345ba26502a78d934013b42 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 16 Nov 2018 14:08:13 -0800 Subject: 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 Tested-by: David Tolnay Reviewed-by: Zach Reizner --- rust-toolchain | 1 + 1 file changed, 1 insertion(+) create mode 100644 rust-toolchain (limited to 'rust-toolchain') 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 -- cgit 1.4.1