about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-05-12 08:27:14 +0000
committerGitHub <noreply@github.com>2025-05-12 08:27:14 +0000
commit48337da4a178e7140d97640819a99bb88e75cd6e (patch)
treeec7dfd445b24399da45c98533c0773b901b21caf
parent7f6d507bba4ed88e996b84b642e661a9672440a4 (diff)
parent8f5dc85f37fb1dc1830e11f387c6eed6b4713c23 (diff)
Use `tempfile::TempDir::keep()` instead of deprecated `into_path()` (#14784)
`tempfile` has deprecated `TempDir::into_path()` (replacing it by
`TempDir::keep()` between version `3.3` which Clippy required and
version `3.20` which is the latest semver-compatible version. Since
Clippy doesn't use a `Cargo.lock` file, the latest version of `tempfile`
is used which leads to CI failure.

changelog: none

r? @flip1995
-rw-r--r--Cargo.toml2
-rw-r--r--tests/integration.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 603169f72b6..92c4db84500 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,7 @@ clippy_lints = { path = "clippy_lints" }
 clippy_utils = { path = "clippy_utils" }
 rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
 clippy_lints_internal = { path = "clippy_lints_internal", optional = true }
-tempfile = { version = "3.3", optional = true }
+tempfile = { version = "3.20", optional = true }
 termize = "0.1"
 color-print = "0.3.4"
 anstream = "0.6.18"
diff --git a/tests/integration.rs b/tests/integration.rs
index 13cf36823c5..cb7d61eee24 100644
--- a/tests/integration.rs
+++ b/tests/integration.rs
@@ -30,7 +30,7 @@ fn integration_test() {
 
     let repo_dir = tempfile::tempdir()
         .expect("couldn't create temp dir")
-        .into_path()
+        .keep()
         .join(crate_name);
 
     let st = Command::new("git")