about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-11-22 16:33:07 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-12-12 10:36:15 +1100
commitf13006182c9df451e7703307467fc1717239cf6e (patch)
tree0b66ca2062a0484bb66615602e584263cda13d64 /src/librustc_codegen_llvm/back
parent2640da7d13a1051dddcf93c06f9ae90508fce6fb (diff)
downloadrust-f13006182c9df451e7703307467fc1717239cf6e.tar.gz
rust-f13006182c9df451e7703307467fc1717239cf6e.zip
Introduce `SearchPath` and replace `SearchPaths` with `Vec<SearchPath>`.
It's more idiomatic, makes the code shorter, and will help with the next
commit.
Diffstat (limited to 'src/librustc_codegen_llvm/back')
-rw-r--r--src/librustc_codegen_llvm/back/link.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs
index 20a7bf9a1a9..da5ad39ad26 100644
--- a/src/librustc_codegen_llvm/back/link.rs
+++ b/src/librustc_codegen_llvm/back/link.rs
@@ -213,8 +213,8 @@ fn link_binary_output(sess: &Session,
 
 fn archive_search_paths(sess: &Session) -> Vec<PathBuf> {
     let mut search = Vec::new();
-    sess.target_filesearch(PathKind::Native).for_each_lib_search_path(|path, _| {
-        search.push(path.to_path_buf());
+    sess.target_filesearch(PathKind::Native).for_each_lib_search_path(|search_path| {
+        search.push(search_path.dir.to_path_buf());
     });
 
     search
@@ -1067,10 +1067,10 @@ fn link_args(cmd: &mut dyn Linker,
 fn add_local_native_libraries(cmd: &mut dyn Linker,
                               sess: &Session,
                               codegen_results: &CodegenResults) {
-    sess.target_filesearch(PathKind::All).for_each_lib_search_path(|path, k| {
-        match k {
-            PathKind::Framework => { cmd.framework_path(path); }
-            _ => { cmd.include_path(&fix_windows_verbatim_for_gcc(path)); }
+    sess.target_filesearch(PathKind::All).for_each_lib_search_path(|search_path| {
+        match search_path.kind {
+            PathKind::Framework => { cmd.framework_path(&search_path.dir); }
+            _ => { cmd.include_path(&fix_windows_verbatim_for_gcc(&search_path.dir)); }
         }
     });