Skip to content

Commit

Permalink
Unrolled build for rust-lang#130221
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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.
  • Loading branch information
rust-timer authored Sep 11, 2024
2 parents 5bce6d4 + 9566163 commit a706374
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 a706374

Please sign in to comment.