]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/back/write.rs
rollup merge of #21457: alexcrichton/issue-21436
[rust.git] / src / librustc_trans / back / write.rs
index 0ade5aaab3de916b40a15b49d2552e7519c69f68..b07c2060e692f043bff622efb6dc8f93dc3dc16e 100644 (file)
@@ -67,11 +67,11 @@ pub fn write_output_file(
         output: &Path,
         file_type: llvm::FileType) {
     unsafe {
-        let output = CString::from_slice(output.as_vec());
+        let output_c = CString::from_slice(output.as_vec());
         let result = llvm::LLVMRustWriteOutputFile(
-                target, pm, m, output.as_ptr(), file_type);
+                target, pm, m, output_c.as_ptr(), file_type);
         if !result {
-            llvm_err(handler, "could not write output".to_string());
+            llvm_err(handler, format!("could not write output to {}", output.display()));
         }
     }
 }