diff --git a/src/bin/cargo/main.rs b/src/bin/cargo/main.rs
index f9299367668..64a465108a1 100644
--- a/src/bin/cargo/main.rs
+++ b/src/bin/cargo/main.rs
@@ -47,6 +47,21 @@ fn main() {
}
}
+/// Table for defining the aliases which come builtin in `Cargo`.
+/// The contents are structured as: `(alias, aliased_command, description)`.
+const BUILTIN_ALIASES: [(&str, &str, &str); 4] = [
+ ("b", "build", "alias: build"),
+ ("c", "check", "alias: check"),
+ ("r", "run", "alias: run"),
+ ("t", "test", "alias: test"),
+];
+
+/// Function which contains the list of all of the builtin aliases and it's
+/// corresponding execs represented as &str.
+fn builtin_aliases_execs(cmd: &str) -> Option<&(&str, &str, &str)> {
+ BUILTIN_ALIASES.iter().find(|alias| alias.0 == cmd)
+}
+
fn aliased_command(config: &Config, command: &str) -> CargoResult