mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Use AbsPath
This commit is contained in:
parent
6403b530bb
commit
eb2cb6b01f
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ use std::{
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use cargo_metadata::{BuildScript, Message, Package, PackageId};
|
use cargo_metadata::{BuildScript, Message, Package, PackageId};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use paths::AbsPathBuf;
|
use paths::{AbsPath, AbsPathBuf};
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
use stdx::JodChild;
|
use stdx::JodChild;
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@ pub struct BuildData {
|
||||||
|
|
||||||
impl BuildDataMap {
|
impl BuildDataMap {
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
cargo_toml: &Path,
|
cargo_toml: &AbsPath,
|
||||||
cargo_features: &CargoConfig,
|
cargo_features: &CargoConfig,
|
||||||
packages: &Vec<Package>,
|
packages: &Vec<Package>,
|
||||||
progress: &dyn Fn(String),
|
progress: &dyn Fn(String),
|
||||||
) -> Result<BuildDataMap> {
|
) -> Result<BuildDataMap> {
|
||||||
let mut cmd = Command::new(toolchain::cargo());
|
let mut cmd = Command::new(toolchain::cargo());
|
||||||
cmd.args(&["check", "--workspace", "--message-format=json", "--manifest-path"])
|
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
|
// --all-targets includes tests, benches and examples in addition to the
|
||||||
// default lib and bins. This is an independent concept from the --targets
|
// default lib and bins. This is an independent concept from the --targets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue