]> git.proxmox.com Git - cargo.git/commitdiff
Ensure future compatibility with fixed module search paths (see rust PR #32006)
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Fri, 4 Mar 2016 18:18:06 +0000 (18:18 +0000)
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>
Fri, 4 Mar 2016 18:19:57 +0000 (18:19 +0000)
src/bin/cargo.rs

index 4ffa5ea8acf233b048aa1416dee49eabe607e3d1..0e007132397da2015755af822024988f7c0e76db 100644 (file)
@@ -95,12 +95,10 @@ macro_rules! each_subcommand{
     }
 }
 
-mod subcommands {
-    macro_rules! declare_mod {
-        ($name:ident) => ( pub mod $name; )
-    }
-    each_subcommand!(declare_mod);
+macro_rules! declare_mod {
+    ($name:ident) => ( pub mod $name; )
 }
+each_subcommand!(declare_mod);
 
 /**
   The top-level `cargo` command handles configuration and project location
@@ -162,8 +160,8 @@ fn execute(flags: Flags, config: &Config) -> CliResult<Option<()>> {
     macro_rules! cmd{
         ($name:ident) => (if args[1] == stringify!($name).replace("_", "-") {
             config.shell().set_verbose(true);
-            let r = cargo::call_main_without_stdin(subcommands::$name::execute, config,
-                                                   subcommands::$name::USAGE,
+            let r = cargo::call_main_without_stdin($name::execute, config,
+                                                   $name::USAGE,
                                                    &args,
                                                    false);
             cargo::process_executed(r, &mut config.shell());