Skip to content

Commit fb996ca

Browse files
committed
Fix
1 parent 3bad558 commit fb996ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/ra_proc_macro_srv/src/dylib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ impl Expander {
199199
}
200200
}
201201

202+
#[cfg(windows)]
202203
fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
203204
let mut to = std::env::temp_dir();
204205
let file_name = path.file_name().ok_or_else(|| {
@@ -212,3 +213,8 @@ fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
212213
std::fs::copy(path, &to)?;
213214
Ok(to)
214215
}
216+
217+
#[cfg(unix)]
218+
fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
219+
Ok(path.to_path_buf())
220+
}

0 commit comments

Comments
 (0)