Skip to content

Commit 3991046

Browse files
committed
rustbuild: clarify comment on target array calculation
The comment touched, as originally written, only concerned itself with the `test` steps. However, since #38468 the `arr` variable actually has gained an indirect relationship with the `dist` steps too. The comment failed to convey the extra meaning, contributing to the misunderstanding which eventually lead to #38637. Fix that by moving the comment into the right place near the relevant condition, and properly documenting `arr`'s purpose.
1 parent 9d3616f commit 3991046

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bootstrap/step.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -838,9 +838,10 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
838838
} else {
839839
&self.build.config.target
840840
};
841-
// If --target was specified but --host wasn't specified, don't run
842-
// any host-only tests
841+
// Determine the actual targets participating in this rule.
843842
let arr = if rule.host {
843+
// If --target was specified but --host wasn't specified,
844+
// don't run any host-only tests
844845
if self.build.flags.target.len() > 0 &&
845846
self.build.flags.host.len() == 0 {
846847
&[]

0 commit comments

Comments
 (0)