]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #10305 - weihanglo:issue-10268, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 20 Jan 2022 15:07:43 +0000 (15:07 +0000)
committerbors <bors@rust-lang.org>
Thu, 20 Jan 2022 15:07:43 +0000 (15:07 +0000)
do not compile test for bins flagged as `test = false`

### What does this PR try to resolve?

Fixes #10268

#6683 introduced a behavior that compiles all bin targets, but for bins with `test = false` they shouldn't be compiled with `--test` as testbins.

### How should we test and review this PR?

In the first commit of this PR, I refines the test `test_filtered_excludes_compiling_examples` to reflect the current wrong behavior (test passed). The following two commits correct the behavior and the test accordingly. The last few commits encapsulate scattered target selection logic into functions on `CompileFilter`.


Trivial merge