From f8e25a687e02f741075a653215a8feedc0b6e7cd Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 11 Jun 2024 14:09:07 +0200 Subject: [PATCH] Add `path` function to `run-make-support` --- src/tools/run-make-support/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) 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: 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()