about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-26 11:12:42 -0700
committerGitHub <noreply@github.com>2016-09-26 11:12:42 -0700
commit8ccfc695b56c102a2e7e95719b398bfa0a5e8af1 (patch)
treeda29ce45db9aa404ab742ab4484898cbc57aaa8c /src/libstd
parentc2769285ad6d078c9a4499ad9e11278e4b78023c (diff)
parentcc8727e67518e98a8ce3068d8dfc732a18f6b382 (diff)
Auto merge of #36719 - shepmaster:build-env-var-reporting, r=alexcrichton
Report which required build-time environment variable is not set
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/build.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs
index 2d540c6b59a..c5732278db9 100644
--- a/src/libstd/build.rs
+++ b/src/libstd/build.rs
@@ -23,8 +23,8 @@ fn main() {
     println!("cargo:rustc-cfg=cargobuild");
     println!("cargo:rerun-if-changed=build.rs");
 
-    let target = env::var("TARGET").unwrap();
-    let host = env::var("HOST").unwrap();
+    let target = env::var("TARGET").expect("TARGET was not set");
+    let host = env::var("HOST").expect("HOST was not set");
     if cfg!(feature = "backtrace") && !target.contains("apple") && !target.contains("msvc") &&
         !target.contains("emscripten") {
         build_libbacktrace(&host, &target);
@@ -103,5 +103,5 @@ fn build_libbacktrace(host: &str, target: &str) {
     run(Command::new("make")
                 .current_dir(&build_dir)
                 .arg(format!("INCDIR={}", src_dir.display()))
-                .arg("-j").arg(env::var("NUM_JOBS").unwrap()));
+                .arg("-j").arg(env::var("NUM_JOBS").expect("NUM_JOBS was not set")));
 }