diff --git a/src/bin/cargo/commands/git_checkout.rs b/src/bin/cargo/commands/git_checkout.rs index 0f309805651..3dff2657f3d 100644 --- a/src/bin/cargo/commands/git_checkout.rs +++ b/src/bin/cargo/commands/git_checkout.rs @@ -1,10 +1,12 @@ +//! Removed. + use crate::command_prelude::*; const REMOVED: &str = "The `git-checkout` command has been removed."; pub fn cli() -> Command { subcommand("git-checkout") - .about("This command has been removed") + .about("REMOVED: This command has been removed") .hide(true) .override_help(REMOVED) } diff --git a/src/bin/cargo/commands/read_manifest.rs b/src/bin/cargo/commands/read_manifest.rs index 692b79d1cbb..c014c99f5f7 100644 --- a/src/bin/cargo/commands/read_manifest.rs +++ b/src/bin/cargo/commands/read_manifest.rs @@ -1,12 +1,15 @@ +//! Deprecated. + use crate::command_prelude::*; pub fn cli() -> Command { subcommand("read-manifest") + .hide(true) .about(color_print::cstr!( "\ -Print a JSON representation of a Cargo.toml manifest. +DEPRECATED: Print a JSON representation of a Cargo.toml manifest. -Deprecated, use `cargo metadata --no-deps` instead.\ +Use `cargo metadata --no-deps` instead.\ " )) .arg_silent_suggestion() diff --git a/src/bin/cargo/commands/verify_project.rs b/src/bin/cargo/commands/verify_project.rs index fae8497b5cb..12564abf2c8 100644 --- a/src/bin/cargo/commands/verify_project.rs +++ b/src/bin/cargo/commands/verify_project.rs @@ -1,3 +1,5 @@ +//! Deprecated. + use crate::command_prelude::*; use std::collections::HashMap; @@ -5,11 +7,12 @@ use std::process; pub fn cli() -> Command { subcommand("verify-project") + .hide(true) .about( "\ -Check correctness of crate manifest. +DEPRECATED: Check correctness of crate manifest. -Deprecated, see https://github.com/rust-lang/cargo/issues/14679.", +See https://github.com/rust-lang/cargo/issues/14679.", ) .arg_silent_suggestion() .arg_manifest_path() diff --git a/src/doc/book.toml b/src/doc/book.toml index ecc9a4b81b0..7c70eb99892 100644 --- a/src/doc/book.toml +++ b/src/doc/book.toml @@ -10,3 +10,6 @@ search.use-boolean-and = true [output.html.redirect] "/guide/build-cache.html" = "../reference/build-cache.html" +"/commands/cargo-git-checkout.html" = "./deprecated-and-removed.html" +"/commands/cargo-read-manifest.html" = "./deprecated-and-removed.html" +"/commands/cargo-verify-project.html" = "./deprecated-and-removed.html" diff --git a/src/doc/src/SUMMARY.md b/src/doc/src/SUMMARY.md index 3fc20e31a84..67c38b94251 100644 --- a/src/doc/src/SUMMARY.md +++ b/src/doc/src/SUMMARY.md @@ -94,6 +94,7 @@ * [cargo package](commands/cargo-package.md) * [cargo publish](commands/cargo-publish.md) * [cargo yank](commands/cargo-yank.md) + * [Deprecated and Removed](commands/deprecated-and-removed.md) * [FAQ](faq.md) * [Appendix: Glossary](appendix/glossary.md) diff --git a/src/doc/src/commands/deprecated-and-removed.md b/src/doc/src/commands/deprecated-and-removed.md new file mode 100644 index 00000000000..fdb84811c25 --- /dev/null +++ b/src/doc/src/commands/deprecated-and-removed.md @@ -0,0 +1,10 @@ +## Deprecated and Removed Commands + +These commands have been deprecated or removed in early Rust releases. +Deprecated commands receive only critical bug fixes, +and may be removed in future versions. +Removed commands are no longer functional and are unsupported. + +* `read-manifest` --- deprecated since Rust 1.13 +* `git-checkout` --- removed since Rust 1.44 +* `verify-project` --- deprecated since Rust 1.84 diff --git a/src/doc/src/commands/index.md b/src/doc/src/commands/index.md index 362a53ec018..8de601a618d 100644 --- a/src/doc/src/commands/index.md +++ b/src/doc/src/commands/index.md @@ -4,3 +4,4 @@ * [Manifest Commands](manifest-commands.md) * [Package Commands](package-commands.md) * [Publishing Commands](publishing-commands.md) +* [Deprecated and Removed](deprecated-and-removed.md) diff --git a/src/etc/_cargo b/src/etc/_cargo index b564f5bb0e9..12aab736bd5 100644 --- a/src/etc/_cargo +++ b/src/etc/_cargo @@ -254,10 +254,6 @@ _cargo() { '--dry-run[perform all checks without uploading]' ;; - read-manifest) - _arguments -s -S $common $manifest - ;; - remove | rm) _arguments -s -A "^--" $common $manifest \ "--dev[remove as a dev dependency]" \ @@ -356,10 +352,6 @@ _cargo() { '*:package:_cargo_package_names' ;; - verify-project) - _arguments -s -S $common $manifest - ;; - version) _arguments -s -S $common ;; diff --git a/src/etc/cargo.bashcomp.sh b/src/etc/cargo.bashcomp.sh index 10212f92b90..2a676325d63 100644 --- a/src/etc/cargo.bashcomp.sh +++ b/src/etc/cargo.bashcomp.sh @@ -74,7 +74,6 @@ _cargo() local opt__package="$opt_common $opt_mani $opt_feat $opt_lock $opt_parallel --allow-dirty -l --list --no-verify --no-metadata --index --registry --target --target-dir" local opt__pkgid="$opt_common $opt_mani $opt_lock $opt_pkg" local opt__publish="$opt_common $opt_mani $opt_feat $opt_lock $opt_parallel --allow-dirty --dry-run --token --no-verify --index --registry --target --target-dir" - local opt__read_manifest="$opt_help $opt_quiet $opt_verbose $opt_mani $opt_color $opt_lock --no-deps" local opt__remove="$opt_common $opt_pkg $opt_lock $opt_mani --dry-run --dev --build --target" local opt__rm="$opt__remove" local opt__report="$opt_help $opt_verbose $opt_color future-incompat future-incompatibilities" @@ -90,7 +89,6 @@ _cargo() local opt__uninstall="$opt_common $opt_lock $opt_pkg --bin --root" local opt__update="$opt_common $opt_mani $opt_lock $opt_pkg --aggressive --recursive --precise --dry-run" local opt__vendor="$opt_common $opt_mani $opt_lock $opt_sync --no-delete --respect-source-config --versioned-dirs" - local opt__verify_project="$opt_common $opt_mani $opt_lock" local opt__version="$opt_common $opt_lock" local opt__yank="$opt_common $opt_lock --version --undo --index --token --registry" local opt__libtest="--help --include-ignored --ignored --test --bench --list --logfile --nocapture --test-threads --skip -q --quiet --exact --color --format" diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index fbaca78d22a..b93f1b58f9a 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -36,7 +36,7 @@ fn list_commands_with_descriptions() { ... r alias: run ... - read-manifest Print a JSON representation of a Cargo.toml manifest. + read-manifest DEPRECATED: Print a JSON representation of a Cargo.toml manifest. ... t alias: test ... diff --git a/tests/testsuite/cargo_read_manifest/help/stdout.term.svg b/tests/testsuite/cargo_read_manifest/help/stdout.term.svg index cc91fd405c7..6fa71ca6bec 100644 --- a/tests/testsuite/cargo_read_manifest/help/stdout.term.svg +++ b/tests/testsuite/cargo_read_manifest/help/stdout.term.svg @@ -19,11 +19,11 @@ - Print a JSON representation of a Cargo.toml manifest. + DEPRECATED: Print a JSON representation of a Cargo.toml manifest. - Deprecated, use `cargo metadata --no-deps` instead. + Use `cargo metadata --no-deps` instead. diff --git a/tests/testsuite/cargo_verify_project/help/stdout.term.svg b/tests/testsuite/cargo_verify_project/help/stdout.term.svg index 921efb0c6aa..130db5c53f5 100644 --- a/tests/testsuite/cargo_verify_project/help/stdout.term.svg +++ b/tests/testsuite/cargo_verify_project/help/stdout.term.svg @@ -19,11 +19,11 @@ - Check correctness of crate manifest. + DEPRECATED: Check correctness of crate manifest. - Deprecated, see https://github.com/rust-lang/cargo/issues/14679. + See https://github.com/rust-lang/cargo/issues/14679.