pkg, bins, "bin", Target::is_bin, profile)?);
targets.append(&mut propose_indicated_targets(
pkg, examples, "example", Target::is_example, profile)?);
- // If --benches was specified, add all targets that would be
- // generated by `cargo bench`.
- let bench_filter = match benches {
- FilterRule::All => Target::benched,
- FilterRule::Just(_) => Target::is_bench
- };
- targets.append(&mut propose_indicated_targets(
- pkg, benches, "bench", bench_filter, bench_profile)?);
// If --tests was specified, add all targets that would be
// generated by `cargo test`.
let test_filter = match tests {
};
targets.append(&mut propose_indicated_targets(
pkg, tests, "test", test_filter, test_profile)?);
+ // If --benches was specified, add all targets that would be
+ // generated by `cargo bench`.
+ let bench_filter = match benches {
+ FilterRule::All => Target::benched,
+ FilterRule::Just(_) => Target::is_bench
+ };
+ targets.append(&mut propose_indicated_targets(
+ pkg, benches, "bench", bench_filter, bench_profile)?);
targets
}
};