aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_proc_macro_srv/src/dylib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_proc_macro_srv/src/dylib.rs b/crates/ra_proc_macro_srv/src/dylib.rs
index 018cc7bb8..99c83481a 100644
--- a/crates/ra_proc_macro_srv/src/dylib.rs
+++ b/crates/ra_proc_macro_srv/src/dylib.rs
@@ -199,6 +199,7 @@ impl Expander {
199 } 199 }
200} 200}
201 201
202#[cfg(windows)]
202fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> { 203fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
203 let mut to = std::env::temp_dir(); 204 let mut to = std::env::temp_dir();
204 let file_name = path.file_name().ok_or_else(|| { 205 let file_name = path.file_name().ok_or_else(|| {
@@ -212,3 +213,8 @@ fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
212 std::fs::copy(path, &to)?; 213 std::fs::copy(path, &to)?;
213 Ok(to) 214 Ok(to)
214} 215}
216
217#[cfg(unix)]
218fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
219 Ok(path.to_path_buf())
220}