From 290545df953c2f9d01e8d7407f72ac465c62178d Mon Sep 17 00:00:00 2001 From: Antti Savolainen Date: Sat, 19 Jul 2025 07:06:29 +0300 Subject: [PATCH 1/2] cargo --- pages/common/cargo-add.md | 2 +- pages/common/cargo-clean.md | 2 +- pages/common/cargo-clippy.md | 6 +++--- pages/common/cargo-owner.md | 6 +++--- pages/common/cargo-package.md | 2 +- pages/common/cargo-publish.md | 2 +- pages/common/cargo-report.md | 6 +++--- pages/common/cargo-tree.md | 2 +- pages/common/cargo-update.md | 2 +- pages/common/cargo-version.md | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pages/common/cargo-add.md b/pages/common/cargo-add.md index 275f36be13ae01..0bce2b8188d571 100644 --- a/pages/common/cargo-add.md +++ b/pages/common/cargo-add.md @@ -13,7 +13,7 @@ - Add a dependency and enable one or more specific features: -`cargo add {{dependency}} --features {{feature_1}},{{feature_2}}` +`cargo add {{dependency}} {{[-F|--features]}} {{feature_1}},{{feature_2}}` - Add an optional dependency, which then gets exposed as a feature of the crate: diff --git a/pages/common/cargo-clean.md b/pages/common/cargo-clean.md index 1500c39f161d96..6b8af25fe4010c 100644 --- a/pages/common/cargo-clean.md +++ b/pages/common/cargo-clean.md @@ -13,7 +13,7 @@ - Remove release artifacts (the `target/release` directory): -`cargo clean --release` +`cargo clean {{[-r|--release]}}` - Remove artifacts in the directory of the given profile (in this case, `target/debug`): diff --git a/pages/common/cargo-clippy.md b/pages/common/cargo-clippy.md index aa8846f8698c51..13948b8997bdf8 100644 --- a/pages/common/cargo-clippy.md +++ b/pages/common/cargo-clippy.md @@ -21,15 +21,15 @@ - Run checks for a lint group (see ): -`cargo clippy -- --warn clippy::{{lint_group}}` +`cargo clippy -- {{[-W|--warn]}} clippy::{{lint_group}}` - Treat warnings as errors: -`cargo clippy -- --deny warnings` +`cargo clippy -- {{[-D|--deny]}} warnings` - Run checks and ignore warnings: -`cargo clippy -- --allow warnings` +`cargo clippy -- {{[-A|--allow]}} warnings` - Apply Clippy suggestions automatically: diff --git a/pages/common/cargo-owner.md b/pages/common/cargo-owner.md index 3ac6df292db96e..81869281616cfc 100644 --- a/pages/common/cargo-owner.md +++ b/pages/common/cargo-owner.md @@ -5,15 +5,15 @@ - Invite the given user or team as an owner: -`cargo owner --add {{username|github:org_name:team_name}} {{crate}}` +`cargo owner {{[-a|--add]}} {{username|github:org_name:team_name}} {{crate}}` - Remove the given user or team as an owner: -`cargo owner --remove {{username|github:org_name:team_name}} {{crate}}` +`cargo owner {{[-r|--remove]}} {{username|github:org_name:team_name}} {{crate}}` - List owners of a crate: -`cargo owner --list {{crate}}` +`cargo owner {{[-l|--list]}} {{crate}}` - Use the specified registry (registry names can be defined in the configuration - the default is ): diff --git a/pages/common/cargo-package.md b/pages/common/cargo-package.md index a0f6ccf40f11a8..8ca02a9e8284c0 100644 --- a/pages/common/cargo-package.md +++ b/pages/common/cargo-package.md @@ -10,4 +10,4 @@ - Display what files would be included in the tarball without actually creating it: -`cargo package --list` +`cargo package {{[-l|--list]}}` diff --git a/pages/common/cargo-publish.md b/pages/common/cargo-publish.md index 665a5be6b3e1c8..c0b61979b93a94 100644 --- a/pages/common/cargo-publish.md +++ b/pages/common/cargo-publish.md @@ -10,7 +10,7 @@ - Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`): -`cargo publish --dry-run` +`cargo publish {{[-n|--dry-run]}}` - Use the specified registry (registry names can be defined in the configuration - the default is ): diff --git a/pages/common/cargo-report.md b/pages/common/cargo-report.md index ebe24cfb24f275..a7a7b04c437398 100644 --- a/pages/common/cargo-report.md +++ b/pages/common/cargo-report.md @@ -5,12 +5,12 @@ - Display a report: -`cargo report {{future-incompatibilities|...}}` +`cargo report future-incompatibilities` - Display a report with the specified Cargo-generated ID: -`cargo report {{future-incompatibilities|...}} --id {{id}}` +`cargo report future-incompatibilities --id {{id}}` - Display a report for the specified package: -`cargo report {{future-incompatibilities|...}} --package {{package}}` +`cargo report future-incompatibilities {{[-p|--package]}} {{package}}` diff --git a/pages/common/cargo-tree.md b/pages/common/cargo-tree.md index b2e69757cba5aa..a240512ceb90be 100644 --- a/pages/common/cargo-tree.md +++ b/pages/common/cargo-tree.md @@ -22,4 +22,4 @@ - Only show normal/build/development dependencies: -`cargo tree --edges {{normal|build|dev}}` +`cargo tree {{[-e|--edges]}} {{normal|build|dev}}` diff --git a/pages/common/cargo-update.md b/pages/common/cargo-update.md index bac92afcaeb4b0..11ec2ab48b9d25 100644 --- a/pages/common/cargo-update.md +++ b/pages/common/cargo-update.md @@ -9,7 +9,7 @@ - Display what would be updated, but don't actually write the lockfile: -`cargo update --dry-run` +`cargo update {{[-n|--dry-run]}}` - Update only the specified dependencies: diff --git a/pages/common/cargo-version.md b/pages/common/cargo-version.md index 538b78887ac542..fa0ac70494675b 100644 --- a/pages/common/cargo-version.md +++ b/pages/common/cargo-version.md @@ -9,4 +9,4 @@ - Display additional build information: -`cargo version --verbose` +`cargo version {{[-v|--verbose]}}` From 83b65191ea10f55fe2601e1fd5e5786f076727c0 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 20 Jul 2025 04:51:13 +0300 Subject: [PATCH 2/2] Update pages/common/cargo-report.md Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/cargo-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/cargo-report.md b/pages/common/cargo-report.md index a7a7b04c437398..30c33c0eef5046 100644 --- a/pages/common/cargo-report.md +++ b/pages/common/cargo-report.md @@ -3,7 +3,7 @@ > Display various kinds of reports. > More information: . -- Display a report: +- Display a report of crates which will eventually stop compiling: `cargo report future-incompatibilities`