1+ //! A module for searching for libraries
2+
13pub use self :: FileMatch :: * ;
24
35use std:: env;
@@ -14,8 +16,6 @@ pub enum FileMatch {
1416 FileDoesntMatch ,
1517}
1618
17- // A module for searching for libraries
18-
1919#[ derive( Clone ) ]
2020pub struct FileSearch < ' a > {
2121 sysroot : & ' a Path ,
@@ -83,12 +83,12 @@ impl<'a> FileSearch<'a> {
8383 FileSearch { sysroot, triple, search_paths, tlib_path, kind }
8484 }
8585
86- // Returns just the directories within the search paths.
86+ /// Returns just the directories within the search paths.
8787 pub fn search_path_dirs ( & self ) -> Vec < PathBuf > {
8888 self . search_paths ( ) . map ( |sp| sp. dir . to_path_buf ( ) ) . collect ( )
8989 }
9090
91- // Returns a list of directories where target-specific tool binaries are located.
91+ /// Returns a list of directories where target-specific tool binaries are located.
9292 pub fn get_tools_search_paths ( & self , self_contained : bool ) -> Vec < PathBuf > {
9393 let rustlib_path = rustc_target:: target_rustlib_path ( self . sysroot , & self . triple ) ;
9494 let p = std:: array:: IntoIter :: new ( [
@@ -107,8 +107,8 @@ pub fn make_target_lib_path(sysroot: &Path, target_triple: &str) -> PathBuf {
107107 . collect :: < PathBuf > ( )
108108}
109109
110- // This function checks if sysroot is found using env::args().next(), and if it
111- // is not found, uses env::current_exe() to imply sysroot.
110+ /// This function checks if sysroot is found using env::args().next(), and if it
111+ /// is not found, uses env::current_exe() to imply sysroot.
112112pub fn get_or_default_sysroot ( ) -> PathBuf {
113113 // Follow symlinks. If the resolved path is relative, make it absolute.
114114 fn canonicalize ( path : PathBuf ) -> PathBuf {
0 commit comments