7388: Minor fix for #7387 r=edwin0cheng a=edwin0cheng

bors r+

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
bors[bot] 2021-01-22 11:52:23 +00:00 committed by GitHub
commit 2ca9cb3753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ use std::{
use anyhow::Result;
use cargo_metadata::{BuildScript, Message, Package, PackageId};
use itertools::Itertools;
use paths::AbsPathBuf;
use paths::{AbsPath, AbsPathBuf};
use rustc_hash::FxHashMap;
use stdx::JodChild;
@ -37,14 +37,14 @@ pub struct BuildData {
impl BuildDataMap {
pub(crate) fn new(
cargo_toml: &Path,
cargo_toml: &AbsPath,
cargo_features: &CargoConfig,
packages: &Vec<Package>,
progress: &dyn Fn(String),
) -> Result<BuildDataMap> {
let mut cmd = Command::new(toolchain::cargo());
cmd.args(&["check", "--workspace", "--message-format=json", "--manifest-path"])
.arg(cargo_toml);
.arg(cargo_toml.as_ref());
// --all-targets includes tests, benches and examples in addition to the
// default lib and bins. This is an independent concept from the --targets