From 1a6146e53638e04ed86ceec417d4197440ead828 Mon Sep 17 00:00:00 2001
From: Yacin Tmimi <yacintmimi@gmail.com>
Date: Mon, 13 Jun 2022 12:57:34 -0400
Subject: [PATCH] Pass `--locked` when installing rustfmt in integration tests

There was recently an issue where `cargo install` was installing a newer
version of a dependency than the one listed in our Cargo.toml. The newer
version added deprecation warnings that caused our continuous integration
tests to break.

As mentioned in the `cargo help install` docs, passing the `--locked`
flag should force cargo to use the `Cargo.lock` file included with
the repository.
---
 ci/integration.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/integration.sh b/ci/integration.sh
index 0269e3ee4af..562d5d70c70 100755
--- a/ci/integration.sh
+++ b/ci/integration.sh
@@ -15,7 +15,7 @@ set -ex
 # it again.
 #
 #which cargo-fmt || cargo install --force
-CFG_RELEASE=nightly CFG_RELEASE_CHANNEL=nightly cargo install --path . --force
+CFG_RELEASE=nightly CFG_RELEASE_CHANNEL=nightly cargo install --path . --force --locked
 
 echo "Integration tests for: ${INTEGRATION}"
 cargo fmt -- --version