From 9de13bc7411f08ad52e0f5c4ca562d1c4daadaae Mon Sep 17 00:00:00 2001 From: Junfeng Li Date: Sun, 19 Jul 2020 23:33:29 +0000 Subject: [PATCH] Add rust-toolchain file and replace cargo with rustup - Avoid issue of compiling project with an older version of compiler and getting error due to new API such as `Option::as_deref`. - Will download and use binaries from rust-lang.org based on specified version in rust-toolchain. This avoid the issue that compiler loads plugin using different versions of glibc/ld than the ones used to produce the plugin. See https://github.com/rust-lang/rust/issues/58394 --- rust-toolchain | 1 + shell.nix | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 rust-toolchain diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 00000000..50aceaa7 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +1.45.0 diff --git a/shell.nix b/shell.nix index bbda153f..23da20cd 100644 --- a/shell.nix +++ b/shell.nix @@ -9,9 +9,10 @@ pkgs.mkShell { git mypy neovim - cargo - rust-analyzer + rustup + rust-analyzer # For integration tests. tmux + vim # For manual tests. vim-vint (with python37Packages; [ flake8