Skip to content

Commit 35577d1

Browse files
celinvaltedinski
authored andcommitted
Add comment to compiltest fn that finds rustc root (rust-lang#771)
1 parent ad5eb38 commit 35577d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/tools/compiletest/src/header.rs

+3
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ impl Config {
176176
}
177177
}
178178

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

0 commit comments

Comments
 (0)