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.
This commit is contained in:
Wang Xuerui 2016-12-28 01:54:09 +08:00
parent 9d3616f78d
commit 3991046d52
No known key found for this signature in database
GPG key ID: 38544B4E2DE7FAB9

View file

@ -838,9 +838,10 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
} else {
&self.build.config.target
};
// If --target was specified but --host wasn't specified, don't run
// any host-only tests
// Determine the actual targets participating in this rule.
let arr = if rule.host {
// If --target was specified but --host wasn't specified,
// don't run any host-only tests
if self.build.flags.target.len() > 0 &&
self.build.flags.host.len() == 0 {
&[]