Avoid an unnecessary clone for copy_cgu_workproduct_to_incr_comp_cache_dir calls
This commit is contained in:
parent
02162c4163
commit
065e202b56
3 changed files with 5 additions and 5 deletions
|
@ -7,13 +7,13 @@ use rustc_fs_util::link_or_copy;
|
|||
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
|
||||
use rustc_session::Session;
|
||||
use std::fs as std_fs;
|
||||
use std::path::PathBuf;
|
||||
use std::path::Path;
|
||||
|
||||
/// Copies a CGU work product to the incremental compilation directory, so next compilation can find and reuse it.
|
||||
pub fn copy_cgu_workproduct_to_incr_comp_cache_dir(
|
||||
sess: &Session,
|
||||
cgu_name: &str,
|
||||
path: &Option<PathBuf>,
|
||||
path: Option<&Path>,
|
||||
) -> Option<(WorkProductId, WorkProduct)> {
|
||||
debug!("copy_cgu_workproduct_to_incr_comp_cache_dir({:?},{:?})", cgu_name, path);
|
||||
sess.opts.incremental.as_ref()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue