]> git.lizzy.rs Git - rust.git/blobdiff - src/build_helper/lib.rs
Rollup merge of #65470 - traxys:fix_65401, r=michaelwoerister
[rust.git] / src / build_helper / lib.rs
index f035a7119188a1aa3c415e09096e20b8e896104f..bb94fb2b755f53342b76fd3dbd28e0e223510196 100644 (file)
@@ -21,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