mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
internal: Use 'ProjectJson' consistently
The Rust source code previously mised ProjectJson and JsonProject, and the TypeScript definition didn't match either. Use 'ProjectJson' everywhere. This is purely an internal change.
This commit is contained in:
@@ -1192,7 +1192,7 @@ pub fn change_source_root_parent_map(
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub enum LinkedProject {
|
||||
ProjectManifest(ProjectManifest),
|
||||
InlineJsonProject(ProjectJson),
|
||||
InlineProjectJson(ProjectJson),
|
||||
}
|
||||
|
||||
impl From<ProjectManifest> for LinkedProject {
|
||||
@@ -1203,7 +1203,7 @@ fn from(v: ProjectManifest) -> Self {
|
||||
|
||||
impl From<ProjectJson> for LinkedProject {
|
||||
fn from(v: ProjectJson) -> Self {
|
||||
LinkedProject::InlineJsonProject(v)
|
||||
LinkedProject::InlineProjectJson(v)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ pub(crate) fn fetch_workspaces(
|
||||
|
||||
if let (Some(_command), Some(path)) = (&discover_command, &path) {
|
||||
let build = linked_projects.iter().find_map(|project| match project {
|
||||
LinkedProject::InlineJsonProject(it) => it.crate_by_buildfile(path),
|
||||
LinkedProject::InlineProjectJson(it) => it.crate_by_buildfile(path),
|
||||
_ => None,
|
||||
});
|
||||
|
||||
@@ -318,7 +318,7 @@ pub(crate) fn fetch_workspaces(
|
||||
&progress,
|
||||
)
|
||||
}
|
||||
LinkedProject::InlineJsonProject(it) => {
|
||||
LinkedProject::InlineProjectJson(it) => {
|
||||
let workspace = project_model::ProjectWorkspace::load_inline(
|
||||
it.clone(),
|
||||
&cargo_config,
|
||||
|
||||
@@ -5,7 +5,7 @@ build system, you’ll have to describe the structure of your project for
|
||||
rust-analyzer in the `rust-project.json` format:
|
||||
|
||||
```typescript
|
||||
interface JsonProject {
|
||||
interface ProjectJson {
|
||||
/// Path to the sysroot directory.
|
||||
///
|
||||
/// The sysroot is where rustc looks for the
|
||||
|
||||
Reference in New Issue
Block a user