]> git.lizzy.rs Git - rust.git/blobdiff - src/build_helper/lib.rs
Auto merge of #65429 - Timmmm:withoptions, r=Mark-Simulacrum
[rust.git] / src / build_helper / lib.rs
index 131d2034675e3db0f0897258dd90493c9c87ba38..bb94fb2b755f53342b76fd3dbd28e0e223510196 100644 (file)
@@ -1,6 +1,3 @@
-// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
-
 use std::fs::File;
 use std::path::{Path, PathBuf};
 use std::process::{Command, Stdio};
@@ -24,6 +21,13 @@ macro_rules! t {
             Err(e) => panic!("{} failed with {}", stringify!($e), e),
         }
     };
+    // it can show extra info in the second parameter
+    ($e:expr, $extra:expr) => {
+        match $e {
+            Ok(e) => e,
+            Err(e) => panic!("{} failed with {} ({:?})", stringify!($e), e, $extra),
+        }
+    };
 }
 
 // Because Cargo adds the compiler's dylib path to our library search path, llvm-config may