diff --git a/src/bin/cargo/main.rs b/src/bin/cargo/main.rs index af2e4141c80..109cd5de5b2 100644 --- a/src/bin/cargo/main.rs +++ b/src/bin/cargo/main.rs @@ -144,6 +144,14 @@ fn list_commands(config: &Config) -> BTreeMap { } } + // `help` is special, so it needs to be inserted separately. + commands.insert( + "help".to_string(), + CommandInfo::BuiltIn { + about: Some("Displays help for a cargo subcommand".to_string()), + }, + ); + commands }