Skip to content

Commit a0ba729

Browse files
committed
fix(help): Generalize --ignore-rust-version
1 parent 7e31f62 commit a0ba729

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+610
-653
lines changed

src/bin/cargo/commands/add.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,10 @@ While you can use the crate in your implementation, it cannot be referenced in y
8585
Example uses:
8686
- Depending on multiple versions of a crate
8787
- Depend on crates with the same name from different registries"),
88-
flag(
89-
"ignore-rust-version",
90-
"Ignore `rust-version` specification in packages"
91-
),
9288
])
9389
.arg_manifest_path_without_unsupported_path_tip()
9490
.arg_package("Package to modify")
91+
.arg_ignore_rust_version()
9592
.arg_dry_run("Don't actually write the manifest")
9693
.arg_silent_suggestion()
9794
.next_help_heading("Source")

src/bin/cargo/commands/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub fn cli() -> Command {
2222
"no-fail-fast",
2323
"Run all benchmarks regardless of failure",
2424
))
25-
.arg_ignore_rust_version()
2625
.arg_message_format()
2726
.arg_silent_suggestion()
2827
.arg_package_spec(
@@ -51,6 +50,7 @@ pub fn cli() -> Command {
5150
.arg_unit_graph()
5251
.arg_timings()
5352
.arg_manifest_path()
53+
.arg_ignore_rust_version()
5454
.after_help(color_print::cstr!(
5555
"Run `<cyan,bold>cargo help bench</>` for more detailed information.\n"
5656
))

src/bin/cargo/commands/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pub fn cli() -> Command {
77
// subcommand aliases are handled in aliased_command()
88
// .alias("b")
99
.about("Compile a local package and all of its dependencies")
10-
.arg_ignore_rust_version()
1110
.arg_future_incompat_report()
1211
.arg_message_format()
1312
.arg_silent_suggestion()
@@ -40,6 +39,7 @@ pub fn cli() -> Command {
4039
.arg_unit_graph()
4140
.arg_timings()
4241
.arg_manifest_path()
42+
.arg_ignore_rust_version()
4343
.after_help(color_print::cstr!(
4444
"Run `<cyan,bold>cargo help build</>` for more detailed information.\n"
4545
))

src/bin/cargo/commands/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pub fn cli() -> Command {
77
// subcommand aliases are handled in aliased_command()
88
// .alias("c")
99
.about("Check a local package and all of its dependencies for errors")
10-
.arg_ignore_rust_version()
1110
.arg_future_incompat_report()
1211
.arg_message_format()
1312
.arg_silent_suggestion()
@@ -37,6 +36,7 @@ pub fn cli() -> Command {
3736
.arg_unit_graph()
3837
.arg_timings()
3938
.arg_manifest_path()
39+
.arg_ignore_rust_version()
4040
.after_help(color_print::cstr!(
4141
"Run `<cyan,bold>cargo help check</>` for more detailed information.\n"
4242
))

src/bin/cargo/commands/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub fn cli() -> Command {
1616
"Don't build documentation for dependencies",
1717
))
1818
.arg(flag("document-private-items", "Document private items"))
19-
.arg_ignore_rust_version()
2019
.arg_message_format()
2120
.arg_silent_suggestion()
2221
.arg_package_spec(
@@ -40,6 +39,7 @@ pub fn cli() -> Command {
4039
.arg_unit_graph()
4140
.arg_timings()
4241
.arg_manifest_path()
42+
.arg_ignore_rust_version()
4343
.after_help(color_print::cstr!(
4444
"Run `<cyan,bold>cargo help doc</>` for more detailed information.\n"
4545
))

src/bin/cargo/commands/fix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub fn cli() -> Command {
2626
"allow-staged",
2727
"Fix code even if the working directory has staged changes",
2828
))
29-
.arg_ignore_rust_version()
3029
.arg_message_format()
3130
.arg_silent_suggestion()
3231
.arg_package_spec(
@@ -54,6 +53,7 @@ pub fn cli() -> Command {
5453
.arg_target_dir()
5554
.arg_timings()
5655
.arg_manifest_path()
56+
.arg_ignore_rust_version()
5757
.after_help(color_print::cstr!(
5858
"Run `<cyan,bold>cargo help fix</>` for more detailed information.\n"
5959
))

src/bin/cargo/commands/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub fn cli() -> Command {
2424
.num_args(0..)
2525
.trailing_var_arg(true),
2626
)
27-
.arg_ignore_rust_version()
2827
.arg_message_format()
2928
.arg_silent_suggestion()
3029
.arg_package("Package with the target to run")
@@ -39,6 +38,7 @@ pub fn cli() -> Command {
3938
.arg_target_triple("Build for the target triple")
4039
.arg_target_dir()
4140
.arg_manifest_path()
41+
.arg_ignore_rust_version()
4242
.arg_unit_graph()
4343
.arg_timings()
4444
.after_help(color_print::cstr!(

src/bin/cargo/commands/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub fn cli() -> Command {
2828
"Comma separated list of types of crates for the compiler to emit",
2929
))
3030
.arg_future_incompat_report()
31-
.arg_ignore_rust_version()
3231
.arg_message_format()
3332
.arg_silent_suggestion()
3433
.arg_package("Package to build")
@@ -53,6 +52,7 @@ pub fn cli() -> Command {
5352
.arg_unit_graph()
5453
.arg_timings()
5554
.arg_manifest_path()
55+
.arg_ignore_rust_version()
5656
.after_help(color_print::cstr!(
5757
"Run `<cyan,bold>cargo help rustc</>` for more detailed information.\n"
5858
))

src/bin/cargo/commands/rustdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pub fn cli() -> Command {
1616
"open",
1717
"Opens the docs in a browser after the operation",
1818
))
19-
.arg_ignore_rust_version()
2019
.arg_message_format()
2120
.arg_silent_suggestion()
2221
.arg_package("Package to document")
@@ -46,6 +45,7 @@ pub fn cli() -> Command {
4645
.arg_unit_graph()
4746
.arg_timings()
4847
.arg_manifest_path()
48+
.arg_ignore_rust_version()
4949
.after_help(color_print::cstr!(
5050
"Run `<cyan,bold>cargo help rustdoc</>` for more detailed information.\n"
5151
))

src/bin/cargo/commands/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ pub fn cli() -> Command {
2121
.arg(flag("doc", "Test only this library's documentation"))
2222
.arg(flag("no-run", "Compile, but don't run tests"))
2323
.arg(flag("no-fail-fast", "Run all tests regardless of failure"))
24-
.arg_ignore_rust_version()
2524
.arg_future_incompat_report()
2625
.arg_message_format()
2726
.arg(
@@ -58,6 +57,7 @@ pub fn cli() -> Command {
5857
.arg_unit_graph()
5958
.arg_timings()
6059
.arg_manifest_path()
60+
.arg_ignore_rust_version()
6161
.after_help(color_print::cstr!(
6262
"Run `<cyan,bold>cargo help test</>` for more detailed information.\n\
6363
Run `<cyan,bold>cargo test -- --help</>` for test binary options.\n",

0 commit comments

Comments
 (0)