Skip to content

Commit

Permalink
Add comment to compiltest fn that finds rustc root (rust-lang#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval authored and tedinski committed Jan 21, 2022
1 parent ad5eb38 commit 35577d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ impl Config {
}
}

/// This function finds the root source of the repository by starting at the source base for
/// compiletest. It will then visit its parent folder and check if we found the root by
/// checking if it can find the compiletest `Cargo.toml` file in the path relative to the root.
pub fn find_rust_src_root(&self) -> Option<PathBuf> {
let mut path = self.src_base.clone();
let path_postfix = Path::new("src/tools/compiletest/Cargo.toml");
Expand Down

0 comments on commit 35577d1

Please sign in to comment.