Rollup merge of #130221 - vetleras:pub_search_path_new, r=chenyukang
Make SearchPath::new public I'm writing a tool that uses `rustc_interface`, and would like to construct `SearchPath` with its `new` method. As all three fields in `SearchPath` are public anyway, the proposed change should not change the privacy or encapsulation of the struct.
This commit is contained in:
commit
678c249708
@ -96,7 +96,7 @@ pub fn from_sysroot_and_triple(sysroot: &Path, triple: &str) -> Self {
|
|||||||
Self::new(PathKind::All, make_target_lib_path(sysroot, triple))
|
Self::new(PathKind::All, make_target_lib_path(sysroot, triple))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new(kind: PathKind, dir: PathBuf) -> Self {
|
pub fn new(kind: PathKind, dir: PathBuf) -> Self {
|
||||||
// Get the files within the directory.
|
// Get the files within the directory.
|
||||||
let files = match std::fs::read_dir(&dir) {
|
let files = match std::fs::read_dir(&dir) {
|
||||||
Ok(files) => files
|
Ok(files) => files
|
||||||
|
Loading…
Reference in New Issue
Block a user