Skip to content

Commit 47a1e5f

Browse files
committed
Better error message when TARGET is missing
1 parent 050415f commit 47a1e5f

File tree

1 file changed

+3
-1
lines changed
  • crates/simd-test-macro/src

1 file changed

+3
-1
lines changed

crates/simd-test-macro/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ pub fn simd_test(
5555
.parse()
5656
.unwrap_or_else(|_| panic!("failed to parse name: {}", name.to_string()));
5757

58-
let target = env::var("TARGET").expect("TARGET environment variable should be set for rustc");
58+
let target = env::var("TARGET").expect(
59+
"TARGET environment variable should be set for rustc (e.g. TARGET=x86_64-apple-darwin cargo test)"
60+
);
5961
let mut force_test = false;
6062
let macro_test = match target
6163
.split('-')

0 commit comments

Comments
 (0)