diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-04-26 18:42:15 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-04-26 18:42:15 +0300 |
| commit | 86969dbe773b6e3f05ab34e9a2f8ba08441ebf88 (patch) | |
| tree | 4b0494030eb15ad9f9e982d87a1c8ac40f024629 /compiler/rustc_interface/src/tests.rs | |
| parent | 5ae50d3b2182f81eea4e4d90e8da3653547215b5 (diff) | |
| download | rust-86969dbe773b6e3f05ab34e9a2f8ba08441ebf88.tar.gz rust-86969dbe773b6e3f05ab34e9a2f8ba08441ebf88.zip | |
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.rs | 8 |
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), |
