From cefb622cf8ccfb8f50dff7ca2327d7dea5be7b7a Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sat, 15 Apr 2023 13:17:59 +0200 Subject: [PATCH] Make all globals actually global --- xtask/src/argument_parsing.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index e653f9a0ec..77433eef6f 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -157,7 +157,7 @@ pub enum BuildOrCheck { #[derive(Parser, Clone)] pub struct Globals { /// For which backend to build (defaults to thumbv7) - #[arg(value_enum, short, long)] + #[arg(value_enum, short, long, global = true)] pub backend: Option, /// List of comma separated examples to include, all others are excluded @@ -166,7 +166,7 @@ pub struct Globals { /// /// Example: `cargo xtask --example complex,spawn,init` /// would include complex, spawn and init - #[arg(short, long, group = "example_group")] + #[arg(short, long, group = "example_group", global = true)] pub example: Option, /// List of comma separated examples to exclude, all others are included @@ -175,11 +175,11 @@ pub struct Globals { /// /// Example: `cargo xtask --excludeexample complex,spawn,init` /// would exclude complex, spawn and init - #[arg(long, group = "example_group")] + #[arg(long, group = "example_group", global = true)] pub exampleexclude: Option, /// Enable more verbose output, repeat up to `-vvv` for even more - #[arg(short, long, action = clap::ArgAction::Count)] + #[arg(short, long, action = clap::ArgAction::Count, global = true)] pub verbose: u8, /// Enable `stderr` inheritance on child processes. @@ -187,7 +187,7 @@ pub struct Globals { /// If this flag is enabled, the output of `stderr` produced by child /// processes is printed directly to `stderr`. This will cause a lot of /// clutter, but can make debugging long-running processes a lot easier. - #[arg(short, long)] + #[arg(short, long, global = true)] pub stderr_inherited: bool, }