Skip to content

Commit

Permalink
Rollup merge of rust-lang#130221 - vetleras:pub_search_path_new, r=ch…
Browse files Browse the repository at this point in the history
…enyukang

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.
  • Loading branch information
matthiaskrgr authored Sep 11, 2024
2 parents 66727ea + 9566163 commit 678c249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/search_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl SearchPath {
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.
let files = match std::fs::read_dir(&dir) {
Ok(files) => files
Expand Down

0 comments on commit 678c249

Please sign in to comment.