From 71770d5e6e5c6d77777e7f9c86f7c9533882c449 Mon Sep 17 00:00:00 2001 From: jyn Date: Thu, 25 May 2023 14:00:55 -0500 Subject: [PATCH] Document `ShouldRun::paths` --- src/bootstrap/builder.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index cf9ae4f0818..30359e47e73 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -473,7 +473,15 @@ impl<'a> ShouldRun<'a> { self.paths(&[path]) } - // multiple aliases for the same job + /// Multiple aliases for the same job. + /// + /// This differs from [`path`] in that multiple calls to path will end up calling `make_run` + /// multiple times, whereas a single call to `paths` will only ever generate a single call to + /// `paths`. + /// + /// This is analogous to `all_krates`, although `all_krates` is gone now. Prefer [`path`] where possible. + /// + /// [`path`]: ShouldRun::path pub fn paths(mut self, paths: &[&str]) -> Self { static SUBMODULES_PATHS: OnceCell> = OnceCell::new();