From 4d4d1592c732a22577dba8c8fbf304e6240e25d8 Mon Sep 17 00:00:00 2001 From: Alex Butler Date: Tue, 29 May 2018 00:18:57 +0100 Subject: [PATCH] Add mercy for devs that run `cargo test` without building --- src/test/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/mod.rs b/src/test/mod.rs index d5c0533fde6..e589b69ec2e 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(), + "no rustfmt bin, try running `cargo build` before testing" + ); return me; }