]> git.proxmox.com Git - cargo.git/blobdiff - src/bin/cargo/commands/mod.rs
refactor(cli): Make help behave like other subcommands
[cargo.git] / src / bin / cargo / commands / mod.rs
index 56ca19bb117198d96142671bef2205c0b9362bc8..0499f9a437f528cc7444b1938f7e59c5c627f066 100644 (file)
@@ -2,16 +2,18 @@ use crate::command_prelude::*;
 
 pub fn builtin() -> Vec<App> {
     vec![
+        add::cli(),
         bench::cli(),
         build::cli(),
         check::cli(),
         clean::cli(),
-        describe_future_incompatibilities::cli(),
+        config::cli(),
         doc::cli(),
         fetch::cli(),
         fix::cli(),
         generate_lockfile::cli(),
         git_checkout::cli(),
+        help::cli(),
         init::cli(),
         install::cli(),
         locate_project::cli(),
@@ -24,6 +26,7 @@ pub fn builtin() -> Vec<App> {
         pkgid::cli(),
         publish::cli(),
         read_manifest::cli(),
+        report::cli(),
         run::cli(),
         rustc::cli(),
         rustdoc::cli(),
@@ -39,18 +42,20 @@ pub fn builtin() -> Vec<App> {
     ]
 }
 
-pub fn builtin_exec(cmd: &str) -> Option<fn(&mut Config, &ArgMatches<'_>) -> CliResult> {
+pub fn builtin_exec(cmd: &str) -> Option<fn(&mut Config, &ArgMatches) -> CliResult> {
     let f = match cmd {
+        "add" => add::exec,
         "bench" => bench::exec,
         "build" => build::exec,
         "check" => check::exec,
         "clean" => clean::exec,
-        "describe-future-incompatibilities" => describe_future_incompatibilities::exec,
+        "config" => config::exec,
         "doc" => doc::exec,
         "fetch" => fetch::exec,
         "fix" => fix::exec,
         "generate-lockfile" => generate_lockfile::exec,
         "git-checkout" => git_checkout::exec,
+        "help" => help::exec,
         "init" => init::exec,
         "install" => install::exec,
         "locate-project" => locate_project::exec,
@@ -63,6 +68,7 @@ pub fn builtin_exec(cmd: &str) -> Option<fn(&mut Config, &ArgMatches<'_>) -> Cli
         "pkgid" => pkgid::exec,
         "publish" => publish::exec,
         "read-manifest" => read_manifest::exec,
+        "report" => report::exec,
         "run" => run::exec,
         "rustc" => rustc::exec,
         "rustdoc" => rustdoc::exec,
@@ -80,11 +86,12 @@ pub fn builtin_exec(cmd: &str) -> Option<fn(&mut Config, &ArgMatches<'_>) -> Cli
     Some(f)
 }
 
+pub mod add;
 pub mod bench;
 pub mod build;
 pub mod check;
 pub mod clean;
-pub mod describe_future_incompatibilities;
+pub mod config;
 pub mod doc;
 pub mod fetch;
 pub mod fix;
@@ -103,6 +110,7 @@ pub mod package;
 pub mod pkgid;
 pub mod publish;
 pub mod read_manifest;
+pub mod report;
 pub mod run;
 pub mod rustc;
 pub mod rustdoc;