1
+ //! A module for searching for libraries
2
+
1
3
pub use self :: FileMatch :: * ;
2
4
3
5
use std:: env;
@@ -14,8 +16,6 @@ pub enum FileMatch {
14
16
FileDoesntMatch ,
15
17
}
16
18
17
- // A module for searching for libraries
18
-
19
19
#[ derive( Clone ) ]
20
20
pub struct FileSearch < ' a > {
21
21
sysroot : & ' a Path ,
@@ -83,12 +83,12 @@ impl<'a> FileSearch<'a> {
83
83
FileSearch { sysroot, triple, search_paths, tlib_path, kind }
84
84
}
85
85
86
- // Returns just the directories within the search paths.
86
+ /// Returns just the directories within the search paths.
87
87
pub fn search_path_dirs ( & self ) -> Vec < PathBuf > {
88
88
self . search_paths ( ) . map ( |sp| sp. dir . to_path_buf ( ) ) . collect ( )
89
89
}
90
90
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.
92
92
pub fn get_tools_search_paths ( & self , self_contained : bool ) -> Vec < PathBuf > {
93
93
let rustlib_path = rustc_target:: target_rustlib_path ( self . sysroot , & self . triple ) ;
94
94
let p = std:: array:: IntoIter :: new ( [
@@ -107,8 +107,8 @@ pub fn make_target_lib_path(sysroot: &Path, target_triple: &str) -> PathBuf {
107
107
. collect :: < PathBuf > ( )
108
108
}
109
109
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.
112
112
pub fn get_or_default_sysroot ( ) -> PathBuf {
113
113
// Follow symlinks. If the resolved path is relative, make it absolute.
114
114
fn canonicalize ( path : PathBuf ) -> PathBuf {
0 commit comments