about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Butler <alexheretic@gmail.com>2018-05-29 00:38:47 +0100
committerAlex Butler <alexheretic@gmail.com>2018-05-29 00:38:47 +0100
commitcd925f01404454db06cb7aa89a5fa407f175f09f (patch)
treed1ac570b597256e855410e0a31d3cb1396ac1bc5
parent5473c3fd92ab7cde61d1421dc27fea7c66d7c1d3 (diff)
Add mercy for devs that run `cargo test` without building
-rw-r--r--src/test/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/mod.rs b/src/test/mod.rs
index d5c0533fde6..3ac8caae291 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -900,6 +900,10 @@ fn rustfmt() -> PathBuf {
     me.pop(); // chop of the test name
     me.pop(); // chop off `deps`
     me.push("rustfmt");
+    assert!(
+        me.is_file() || me.with_extension("exe").is_file(),
+        "no rustfmt bin, try running `cargo build` before testing"
+    );
     return me;
 }