cafa657469bda1baf145c090e168057ae632464d

Author
Joseph Richey <joerichey@google.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Correctly handle verbose/version flags for rustc (#6786)

See the help output for rustc (v1.25)

Diff

 1diff --git a/plugins/rust/_rust b/plugins/rust/_rust
 2index ac6aee160bf086c5cdd53b220a32c55d8f387b0d..6e3f344cdb5aed39d63bf75af9552bbc09f8d335 100644
 3--- a/plugins/rust/_rust
 4+++ b/plugins/rust/_rust
 5@@ -88,14 +88,14 @@ _rustc_opts_vals=(
 6     --pretty='[Pretty-print the input instead of compiling]::TYPE:_values "TYPES" "$_rustc_pretty_types[@]"'
 7     --unpretty='[Present the input source, unstable (and less-pretty)]::TYPE:_values "TYPES" "$_rustc_unpretty_types[@]"'
 8     --color='[Configure coloring of output]:CONF:_values "COLORS" "$_rustc_color_types[@]"'
 9-    {-v,--version}'[Print version info and exit]::VERBOSE:(verbose)'
10 )
11 
12 _rustc_opts_switches=(
13     -g'[Equivalent to --debuginfo=2]'
14     -O'[Equivalent to --opt-level=2]'
15     --test'[Build a test harness]'
16-    --verbose'[Use verbose output]'
17+    {-v,--verbose}'[Use verbose output]'
18+    {-V,--version}'[Print version info and exit]'
19     {-h,--help}'[Display this message]'
20     --no-analysis'[Parse and expand the output, but run no analysis or produce output]'
21     --no-trans'[Run all passes except translation; no output]'