File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ pub fn main(config: &mut LazyConfig) -> CliResult {
55
55
. map ( String :: as_str)
56
56
== Some ( "help" )
57
57
{
58
+ let header = style:: HEADER . render ( ) ;
59
+ let literal = style:: LITERAL . render ( ) ;
60
+ let placeholder = style:: PLACEHOLDER . render ( ) ;
61
+ let reset = anstyle:: Reset . render ( ) ;
62
+
58
63
let options = CliUnstable :: help ( ) ;
59
64
let non_hidden_options: Vec < ( String , String ) > = options
60
65
. iter ( )
@@ -71,7 +76,7 @@ pub fn main(config: &mut LazyConfig) -> CliResult {
71
76
. map ( |( option_name, option_help_message) | {
72
77
let option_name_kebab_case = option_name. replace ( "_" , "-" ) ;
73
78
format ! (
74
- " -Z {:<longest_option$} -- {}" ,
79
+ " {literal} -Z {:<longest_option$}{reset } -- {}" ,
75
80
option_name_kebab_case, option_help_message
76
81
)
77
82
} )
@@ -80,11 +85,11 @@ pub fn main(config: &mut LazyConfig) -> CliResult {
80
85
drop_println ! (
81
86
config,
82
87
"
83
- Available unstable (nightly-only) flags:
88
+ {header} Available unstable (nightly-only) flags:{reset}
84
89
85
90
{}
86
91
87
- Run with 'cargo -Z [FLAG] [COMMAND]'" ,
92
+ Run with '{literal} cargo -Z{reset} {placeholder} [FLAG] [COMMAND]{reset} '" ,
88
93
joined
89
94
) ;
90
95
if !config. nightly_features_allowed {
You can’t perform that action at this time.
0 commit comments