- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.7k
Closed
Description
cargo$ git grep all-targets
src/bin/bench.rs:    --all-targets                Benchmark all targets (default)
src/bin/build.rs:    --all-targets                Build all targets (lib and bin targets by default)
src/bin/check.rs:    --all-targets                Check all targets (lib and bin targets by default)
src/bin/rustc.rs:    --all-targets            Build all targets (lib and bin targets by default)
src/bin/rustdoc.rs:    --all-targets            Build all targets (default)
src/bin/test.rs:    --all-targets                Test all targets (default)
These were originally added in #4400, the problem is it currently doesn't work, "all targets" is in effect no matter what and the flag is totally redundant. This is because CompileFilter has a Default enum which matches all targets (see CompileFilter::matches) and this Default enum is used in most cases (see CompileFilter::new).
I suggest updating CompileFilter::matches to match only lib/bin targets for CompileFilter::Default and updating the documentation to match.
Note that doing nothing is not an option, the documentation is currently incorrect and at the very least needs to be fixed so every instance above says "X all targets (default)" i.e. all the flags are redundant.
Metadata
Metadata
Assignees
Labels
No labels