diff --git a/src/cargo/core/compiler/compilation.rs b/src/cargo/core/compiler/compilation.rs index bda915b5b1f..43224e2bd4e 100644 --- a/src/cargo/core/compiler/compilation.rs +++ b/src/cargo/core/compiler/compilation.rs @@ -21,11 +21,6 @@ pub struct Doctest { /// A structure returning the result of a compilation. pub struct Compilation<'cfg> { - /// A mapping from a package to the list of libraries that need to be - /// linked when working with that package. - // TODO: deprecated, remove - pub libraries: HashMap>, - /// An array of all tests created during this compilation. pub tests: Vec<(Package, TargetKind, String, PathBuf)>, @@ -106,7 +101,6 @@ impl<'cfg> Compilation<'cfg> { server.configure(&mut rustc); } Ok(Compilation { - libraries: HashMap::new(), native_dirs: BTreeSet::new(), // TODO: deprecated, remove root_output: PathBuf::from("/"), deps_output: PathBuf::from("/"), diff --git a/src/cargo/core/compiler/context/mod.rs b/src/cargo/core/compiler/context/mod.rs index df5671403ae..225e6ebd53f 100644 --- a/src/cargo/core/compiler/context/mod.rs +++ b/src/cargo/core/compiler/context/mod.rs @@ -189,13 +189,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> { )); } else if unit.target.is_bin() || unit.target.is_bin_example() { self.compilation.binaries.push(bindst.clone()); - } else if unit.target.is_lib() { - let pkgid = unit.pkg.package_id().clone(); - self.compilation - .libraries - .entry(pkgid) - .or_insert_with(HashSet::new) - .insert((unit.target.clone(), output.path.clone())); } } @@ -212,24 +205,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> { .or_insert_with(Vec::new) .push(("OUT_DIR".to_string(), out_dir)); } - - if !dep.target.is_lib() { - continue; - } - if dep.mode.is_doc() { - continue; - } - - let outputs = self.outputs(dep)?; - self.compilation - .libraries - .entry(unit.pkg.package_id().clone()) - .or_insert_with(HashSet::new) - .extend( - outputs - .iter() - .map(|output| (dep.target.clone(), output.path.clone())), - ); } if unit.mode == CompileMode::Doctest {