diff --git a/src/bin/cargo/commands/check.rs b/src/bin/cargo/commands/check.rs index c9bbac1e74a..2edb6089c1b 100644 --- a/src/bin/cargo/commands/check.rs +++ b/src/bin/cargo/commands/check.rs @@ -4,6 +4,8 @@ use cargo::ops; pub fn cli() -> App { subcommand("check") + // subcommand aliases are handled in commands::builtin_exec() and cli::expand_aliases() + // .alias("c") .about("Check a local package and all of its dependencies for errors") .arg_package_spec( "Package(s) to check", diff --git a/src/bin/cargo/commands/mod.rs b/src/bin/cargo/commands/mod.rs index 6e3670f84a5..3f7e4bf26e2 100644 --- a/src/bin/cargo/commands/mod.rs +++ b/src/bin/cargo/commands/mod.rs @@ -44,7 +44,7 @@ pub fn builtin_exec(cmd: &str) -> Option { let exec = match cmd { "bench" => bench::exec, "build" | "b" => build::exec, - "check" => check::exec, + "check" | "c" => check::exec, "clean" => clean::exec, "doc" => doc::exec, "fetch" => fetch::exec, @@ -77,6 +77,7 @@ pub fn builtin_exec(cmd: &str) -> Option { let alias_for = match cmd { "b" => Some("build"), + "c" => Some("check"), "r" => Some("run"), "t" => Some("test"), _ => None,