Revert "Make the default behaviour of `cargo build` match the documentation"
authorXimin Luo <infinity0@pwned.gg>
Tue, 6 Mar 2018 19:49:20 +0000 (20:49 +0100)
committerXimin Luo <infinity0@pwned.gg>
Tue, 6 Mar 2018 19:49:20 +0000 (20:49 +0100)
This reverts commit 3fc0715d33ccea567526242d2247576930db4a7c.

src/cargo/ops/cargo_compile.rs

index 4d343b230d83ea44135a217e71bfee863059f794..484c0d32a3358e06b84ef679c6933012a486acdc 100644 (file)
@@ -422,7 +422,7 @@ impl<'a> CompileFilter<'a> {
 
     pub fn need_dev_deps(&self) -> bool {
         match *self {
-            CompileFilter::Default { .. } => false,
+            CompileFilter::Default { .. } => true,
             CompileFilter::Only { examples, tests, benches, .. } =>
                 examples.is_specific() || tests.is_specific() || benches.is_specific()
         }
@@ -430,11 +430,7 @@ impl<'a> CompileFilter<'a> {
 
     pub fn matches(&self, target: &Target) -> bool {
         match *self {
-            CompileFilter::Default { .. } => match *target.kind() {
-                TargetKind::Bin => true,
-                TargetKind::Lib(..) => true,
-                _ => false,
-            },
+            CompileFilter::Default { .. } => true,
             CompileFilter::Only { lib, bins, examples, tests, benches, .. } => {
                 let rule = match *target.kind() {
                     TargetKind::Bin => bins,