diff options
| author | Ryan Levick <ryan.levick@gmail.com> | 2021-01-26 22:27:42 +0100 |
|---|---|---|
| committer | Ryan Levick <ryan.levick@gmail.com> | 2021-01-29 11:02:12 +0100 |
| commit | 6c7ecd007f9c8fdf7f5cbbc01837cc04c81a781c (patch) | |
| tree | 9da1b5ed7a022386d2b38bed8164d7cf112eb80b /compiler/rustc_interface/src | |
| parent | c6bc46227ab57a844fc7a9ed3a6c9efb35c725a9 (diff) | |
| download | rust-6c7ecd007f9c8fdf7f5cbbc01837cc04c81a781c.tar.gz rust-6c7ecd007f9c8fdf7f5cbbc01837cc04c81a781c.zip | |
Pre-canoncalize ExternLocation::ExactPaths
Diffstat (limited to 'compiler/rustc_interface/src')
| -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), |
