diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-06-11 14:09:07 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-06-11 14:09:38 +0200 |
| commit | f8e25a687e02f741075a653215a8feedc0b6e7cd (patch) | |
| tree | a1a33a4ce2e5a3a9faaa2cc6977642a96594630a | |
| parent | f21554f7f0ff447b803961c51acafde04553c1ed (diff) | |
| download | rust-f8e25a687e02f741075a653215a8feedc0b6e7cd.tar.gz rust-f8e25a687e02f741075a653215a8feedc0b6e7cd.zip | |
Add `path` function to `run-make-support`
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index b17f217c133..20b7bdfdcef 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -76,6 +76,11 @@ pub fn htmldocck() -> Command { python } +/// Returns the path for a local test file. +pub fn path<P: AsRef<Path>>(p: P) -> PathBuf { + cwd().join(p.as_ref()) +} + /// Path to the root rust-lang/rust source checkout. pub fn source_root() -> PathBuf { env_var("SOURCE_ROOT").into() |
