diff --git a/src/cargo/core/compiler/context/compilation_files.rs b/src/cargo/core/compiler/context/compilation_files.rs index b5e069ae931..37ab2520223 100644 --- a/src/cargo/core/compiler/context/compilation_files.rs +++ b/src/cargo/core/compiler/context/compilation_files.rs @@ -191,6 +191,8 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> { /// Returns the directory where the artifacts for the given unit are /// initially created. pub fn out_dir(&self, unit: &Unit) -> PathBuf { + // Docscrape units need to have doc/ set as the out_dir so sources for reverse-dependencies + // will be put into doc/ and not into deps/ where the *.examples files are stored. if unit.mode.is_doc() || unit.mode.is_doc_scrape() { self.layout(unit.kind).doc().to_path_buf() } else if unit.mode.is_doc_test() { diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index 5810083920c..8594a174b3d 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -229,7 +229,7 @@ impl Packages { } } -#[derive(Debug, PartialEq, Eq, Clone)] +#[derive(Debug, PartialEq, Eq)] pub enum LibRule { /// Include the library, fail if not present True, @@ -239,13 +239,13 @@ pub enum LibRule { False, } -#[derive(Debug, Clone)] +#[derive(Debug)] pub enum FilterRule { All, Just(Vec), } -#[derive(Debug, Clone)] +#[derive(Debug)] pub enum CompileFilter { Default { /// Flag whether targets can be safely skipped when required-features are not satisfied.