Skip to content

Commit 26f5f3f

Browse files
authored
Fix the description of the "root" field of the cargo metadata's output (#15182)
<!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. --> Fixes #15181.
2 parents c52d4da + eb5c9a8 commit 26f5f3f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/doc/man/cargo-metadata.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ The JSON output has the following format:
312312
]
313313
}
314314
],
315-
/* The root package of the workspace.
316-
This is null if this is a virtual workspace. Otherwise it is
317-
the Package ID of the root package.
315+
/* The package in the current working directory (if --manifest-path is not given).
316+
This is null if there is a virtual workspace. Otherwise it is
317+
the Package ID of the package.
318318
*/
319319
"root": "file:///path/to/my-package#0.1.0",
320320
},
@@ -359,7 +359,7 @@ possible value.
359359
360360
{{#option "`--filter-platform` _triple_" }}
361361
This filters the `resolve` output to only include dependencies for the
362-
given [target triple](../appendix/glossary.html#target).
362+
given [target triple](../appendix/glossary.html#target).
363363
Without this flag, the resolve includes all targets.
364364
365365
Note that the dependencies listed in the "packages" array still includes all

src/doc/man/generated_txt/cargo-metadata.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ OUTPUT FORMAT
308308
]
309309
}
310310
],
311-
/* The root package of the workspace.
312-
This is null if this is a virtual workspace. Otherwise it is
313-
the Package ID of the root package.
311+
/* The package in the current working directory (if --manifest-path is not given).
312+
This is null if there is a virtual workspace. Otherwise it is
313+
the Package ID of the package.
314314
*/
315315
"root": "file:///path/to/my-package#0.1.0",
316316
},

src/doc/src/commands/cargo-metadata.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ The JSON output has the following format:
312312
]
313313
}
314314
],
315-
/* The root package of the workspace.
316-
This is null if this is a virtual workspace. Otherwise it is
317-
the Package ID of the root package.
315+
/* The package in the current working directory (if --manifest-path is not given).
316+
This is null if there is a virtual workspace. Otherwise it is
317+
the Package ID of the package.
318318
*/
319319
"root": "file:///path/to/my-package#0.1.0",
320320
},

src/etc/man/cargo-metadata.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ The JSON output has the following format:
314314
]
315315
}
316316
],
317-
/* The root package of the workspace.
318-
This is null if this is a virtual workspace. Otherwise it is
319-
the Package ID of the root package.
317+
/* The package in the current working directory (if \-\-manifest\-path is not given).
318+
This is null if there is a virtual workspace. Otherwise it is
319+
the Package ID of the package.
320320
*/
321321
"root": "file:///path/to/my\-package#0.1.0",
322322
},

0 commit comments

Comments
 (0)