about summary refs log tree commit diff
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-05-25 14:00:55 -0500
committerjyn <github@jyn.dev>2023-05-29 13:26:44 -0500
commit71770d5e6e5c6d77777e7f9c86f7c9533882c449 (patch)
treedff069ec102b2ffd95e5ece680597dc16eda4c0b
parent3e765a7f719951a9c1b69a13487e9f817e5a03b1 (diff)
downloadrust-71770d5e6e5c6d77777e7f9c86f7c9533882c449.tar.gz
rust-71770d5e6e5c6d77777e7f9c86f7c9533882c449.zip
Document `ShouldRun::paths`
-rw-r--r--src/bootstrap/builder.rs10
1 files changed, 9 insertions, 1 deletions
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<Vec<String>> = OnceCell::new();