about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/tests.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-27 11:54:59 +0200
committerGitHub <noreply@github.com>2025-04-27 11:54:59 +0200
commit1e677438f819f8e39d847d79b514b1e998db93da (patch)
tree6d2ad99f0cbcbff5b299c4dbde18ac3c0b1d4385 /compiler/rustc_interface/src/tests.rs
parent2575c7d2dcc8545c1d0ccae891b033e162094f7f (diff)
parent86969dbe773b6e3f05ab34e9a2f8ba08441ebf88 (diff)
Rollup merge of #140339 - petrochenkov:capanew, r=lqd
session: Cleanup `CanonicalizedPath::new`

It wants an owned path, so pass an owned path.
Diffstat (limited to 'compiler/rustc_interface/src/tests.rs')
-rw-r--r--compiler/rustc_interface/src/tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs
index 5c8c51c8bbc..0ceda220134 100644
--- a/compiler/rustc_interface/src/tests.rs
+++ b/compiler/rustc_interface/src/tests.rs
@@ -1,7 +1,7 @@
 #![allow(rustc::bad_opt_access)]
-use std::collections::{BTreeMap, BTreeSet};
+use std::collections::BTreeMap;
 use std::num::NonZero;
-use std::path::{Path, PathBuf};
+use std::path::PathBuf;
 use std::sync::atomic::AtomicBool;
 
 use rustc_abi::Align;
@@ -89,8 +89,8 @@ where
     S: Into<String>,
     I: IntoIterator<Item = S>,
 {
-    let locations: BTreeSet<CanonicalizedPath> =
-        locations.into_iter().map(|s| CanonicalizedPath::new(Path::new(&s.into()))).collect();
+    let locations =
+        locations.into_iter().map(|s| CanonicalizedPath::new(PathBuf::from(s.into()))).collect();
 
     ExternEntry {
         location: ExternLocation::ExactPaths(locations),