diff options
| author | Yoshiki Matsuda <myskjp@gmail.com> | 2022-06-25 01:12:08 +0900 |
|---|---|---|
| committer | Yoshiki Matsuda <myskjp@gmail.com> | 2022-07-02 22:54:37 +0900 |
| commit | 7a5e773dc23bb485df1655ca01d59cc55e435b6a (patch) | |
| tree | 1a41671a50faa27eca24edd436e3927dab2eeb45 | |
| parent | a206121388524c6b0d5b8c5f97fc732e4ad16709 (diff) | |
| download | rust-7a5e773dc23bb485df1655ca01d59cc55e435b6a.tar.gz rust-7a5e773dc23bb485df1655ca01d59cc55e435b6a.zip | |
fall back on the blank path if out_filename is blank
| -rw-r--r-- | compiler/rustc_metadata/src/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/fs.rs b/compiler/rustc_metadata/src/fs.rs index 7661eec7006..e6072901aaa 100644 --- a/compiler/rustc_metadata/src/fs.rs +++ b/compiler/rustc_metadata/src/fs.rs @@ -64,7 +64,7 @@ pub fn encode_and_write_metadata( // which is why we create it inside the output directory specifically. let metadata_tmpdir = TempFileBuilder::new() .prefix("rmeta") - .tempdir_in(out_filename.parent().unwrap_or_else(|| Path::new("tmp"))) + .tempdir_in(out_filename.parent().unwrap_or_else(|| Path::new(""))) .unwrap_or_else(|err| tcx.sess.fatal(&format!("couldn't create a temp dir: {}", err))); let metadata_tmpdir = MaybeTempDir::new(metadata_tmpdir, tcx.sess.opts.cg.save_temps); let metadata_filename = metadata_tmpdir.as_ref().join(METADATA_FILENAME); |
