Skip to content

Commit

Permalink
use allow_hyphen_values
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandragorian committed Nov 24, 2024
1 parent 18df717 commit 386185e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions miri-script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,26 @@ fn build_cli() -> ClapCommand {
Arg::new("flags")
.help("Flags that are passed through to `cargo install`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
ClapCommand::new("build").about("Just build miri.").arg(
Arg::new("flags")
.help("Flags that are passed through to `cargo build`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
ClapCommand::new("check").about("Just check miri.").arg(
Arg::new("flags")
.help("Flags that are passed through to `cargo check`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
Expand All @@ -175,7 +178,8 @@ fn build_cli() -> ClapCommand {
Arg::new("flags")
.help("Flags that are passed through to the test harness.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
Expand All @@ -195,31 +199,35 @@ fn build_cli() -> ClapCommand {
Arg::new("flags")
.help("Flags that are passed through to `miri`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
ClapCommand::new("doc").about("Build documentation.").arg(
Arg::new("flags")
.help("Flags that are passed through to `cargo doc`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
ClapCommand::new("fmt").about("Format all sources and tests.").arg(
Arg::new("flags")
.help("Flags that are passed through to `rustfmt`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
ClapCommand::new("clippy").about("Runs clippy on all sources.").arg(
Arg::new("flags")
.help("Flags that are passed through to `cargo clippy`.")
.action(ArgAction::Append)
.trailing_var_arg(true),
.trailing_var_arg(true)
.allow_hyphen_values(true),
),
)
.subcommand(
Expand All @@ -235,7 +243,8 @@ fn build_cli() -> ClapCommand {
.subcommand(
ClapCommand::new("toolchain")
.about("Update and activate the rustup toolchain 'miri'.")
.arg(Arg::new("flags").action(ArgAction::Append).trailing_var_arg(true)),
.arg(Arg::new("flags").action(ArgAction::Append).trailing_var_arg(true))
.allow_hyphen_values(true),
)
.subcommand(
ClapCommand::new("rustc-pull")
Expand Down

0 comments on commit 386185e

Please sign in to comment.