mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
⬆️ rust-analyzer
This commit is contained in:
parent
26a413e015
commit
8807fc4cc3
64 changed files with 2244 additions and 1607 deletions
|
@ -67,7 +67,7 @@ impl ProjectManifest {
|
|||
if path.file_name().unwrap_or_default() == "Cargo.toml" {
|
||||
return Ok(ProjectManifest::CargoToml(path));
|
||||
}
|
||||
bail!("project root must point to Cargo.toml or rust-project.json: {}", path.display())
|
||||
bail!("project root must point to Cargo.toml or rust-project.json: {}", path.display());
|
||||
}
|
||||
|
||||
pub fn discover_single(path: &AbsPath) -> Result<ProjectManifest> {
|
||||
|
@ -78,7 +78,7 @@ impl ProjectManifest {
|
|||
};
|
||||
|
||||
if !candidates.is_empty() {
|
||||
bail!("more than one project")
|
||||
bail!("more than one project");
|
||||
}
|
||||
Ok(res)
|
||||
}
|
||||
|
@ -157,3 +157,17 @@ fn utf8_stdout(mut cmd: Command) -> Result<String> {
|
|||
let stdout = String::from_utf8(output.stdout)?;
|
||||
Ok(stdout.trim().to_string())
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub enum InvocationStrategy {
|
||||
Once,
|
||||
#[default]
|
||||
PerWorkspace,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub enum InvocationLocation {
|
||||
Root(AbsPathBuf),
|
||||
#[default]
|
||||
Workspace,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue