]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_session/src/filesearch.rs
Rollup merge of #93206 - ChrisDenton:ntopenfile, r=nagisa
[rust.git] / compiler / rustc_session / src / filesearch.rs
index e6ec16b393b2f966334e594ab73a88b9a7d8b6d6..9200be363addec569720abb729430f2e64ce633f 100644 (file)
@@ -5,7 +5,7 @@
 use std::iter::FromIterator;
 use std::path::{Path, PathBuf};
 
-use crate::search_paths::{PathKind, SearchPath, SearchPathFile};
+use crate::search_paths::{PathKind, SearchPath};
 use rustc_fs_util::fix_windows_verbatim_for_gcc;
 use tracing::debug;
 
@@ -41,19 +41,6 @@ pub fn get_self_contained_lib_path(&self) -> PathBuf {
         self.get_lib_path().join("self-contained")
     }
 
-    pub fn search<F>(&self, mut pick: F)
-    where
-        F: FnMut(&SearchPathFile, PathKind),
-    {
-        for search_path in self.search_paths() {
-            debug!("searching {}", search_path.dir.display());
-            for spf in search_path.files.iter() {
-                debug!("testing {}", spf.path.display());
-                pick(spf, search_path.kind);
-            }
-        }
-    }
-
     pub fn new(
         sysroot: &'a Path,
         triple: &'a str,