diff options
Diffstat (limited to 'compiler/rustc_interface')
| -rw-r--r-- | compiler/rustc_interface/src/tests.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 305ae23669b..31e29351856 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -11,7 +11,7 @@ use rustc_session::config::{ }; use rustc_session::lint::Level; use rustc_session::search_paths::SearchPath; -use rustc_session::utils::NativeLibKind; +use rustc_session::utils::{CanonicalizedPath, NativeLibKind}; use rustc_session::{build_session, getopts, DiagnosticOutput, Session}; use rustc_span::edition::{Edition, DEFAULT_EDITION}; use rustc_span::symbol::sym; @@ -20,7 +20,7 @@ use rustc_target::spec::{CodeModel, LinkerFlavor, MergeFunctions, PanicStrategy} use rustc_target::spec::{RelocModel, RelroLevel, SplitDebuginfo, TlsModel}; use std::collections::{BTreeMap, BTreeSet}; use std::iter::FromIterator; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; type CfgSpecs = FxHashSet<(String, Option<String>)>; @@ -50,7 +50,8 @@ where S: Into<String>, I: IntoIterator<Item = S>, { - let locations: BTreeSet<_> = locations.into_iter().map(|s| s.into()).collect(); + let locations: BTreeSet<CanonicalizedPath> = + locations.into_iter().map(|s| CanonicalizedPath::new(Path::new(&s.into()))).collect(); ExternEntry { location: ExternLocation::ExactPaths(locations), |
