@@ -1565,7 +1565,7 @@ The default is {DEFAULT_EDITION} and the latest stable edition is {LATEST_STABLE
15651565static PRINT_HELP : LazyLock < String > = LazyLock :: new ( || {
15661566 format ! (
15671567 "Compiler information to print on stdout (or to a file)\n \
1568- INFO may be one of ({}) .",
1568+ INFO may be one of <{}> .",
15691569 PRINT_KINDS . iter( ) . map( |( name, _) | format!( "{name}" ) ) . collect:: <Vec <_>>( ) . join( "|" )
15701570 )
15711571} ) ;
@@ -1586,73 +1586,80 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
15861586 "" ,
15871587 "cfg" ,
15881588 "Configure the compilation environment.\n \
1589- SPEC supports the syntax `NAME[=\" VALUE\" ]`.",
1590- "SPEC" ,
1589+ SPEC supports the syntax `< NAME> [=\" VALUE\" ]`.",
1590+ "< SPEC> " ,
15911591 ) ,
1592- opt( Stable , Multi , "" , "check-cfg" , "Provide list of expected cfgs for checking" , "SPEC" ) ,
1592+ opt( Stable , Multi , "" , "check-cfg" , "Provide list of expected cfgs for checking" , "< SPEC> " ) ,
15931593 opt(
15941594 Stable ,
15951595 Multi ,
15961596 "L" ,
15971597 "" ,
15981598 "Add a directory to the library search path. \
1599- The optional KIND can be one of dependency, crate, native, framework, or all (the default).",
1600- "[KIND=] PATH" ,
1599+ The optional < KIND> can be one of < dependency| crate| native| framework| all> ( default: all ).",
1600+ "[< KIND>=]< PATH> " ,
16011601 ) ,
16021602 opt(
16031603 Stable ,
16041604 Multi ,
16051605 "l" ,
16061606 "" ,
16071607 "Link the generated crate(s) to the specified native\n \
1608- library NAME. The optional KIND can be one of\n \
1609- static, framework, or dylib (the default).\n \
1610- Optional comma separated MODIFIERS\n \
1611- ( bundle|verbatim|whole-archive|as-needed) \n \
1608+ library < NAME> . The optional < KIND> can be one of\n \
1609+ < static| framework| dylib> ( default: dylib ).\n \
1610+ Optional comma separated < MODIFIERS> \n \
1611+ < bundle|verbatim|whole-archive|as-needed> \n \
16121612 may be specified each with a prefix of either '+' to\n \
16131613 enable or '-' to disable.",
1614- "[KIND[: MODIFIERS]=]NAME[: RENAME]" ,
1614+ "[< KIND>[:< MODIFIERS> ]=]< NAME>[:< RENAME> ]" ,
16151615 ) ,
16161616 make_crate_type_option( ) ,
1617- opt( Stable , Opt , "" , "crate-name" , "Specify the name of the crate being built" , "NAME" ) ,
1617+ opt( Stable , Opt , "" , "crate-name" , "Specify the name of the crate being built" , "< NAME> " ) ,
16181618 opt( Stable , Opt , "" , "edition" , & EDITION_STRING , EDITION_NAME_LIST ) ,
16191619 opt(
16201620 Stable ,
16211621 Multi ,
16221622 "" ,
16231623 "emit" ,
16241624 "Comma separated list of types of output for the compiler to emit" ,
1625- "[ asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir] " ,
1625+ "< asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir> " ,
16261626 ) ,
1627- opt( Stable , Multi , "" , "print" , & PRINT_HELP , "INFO[= FILE]" ) ,
1627+ opt( Stable , Multi , "" , "print" , & PRINT_HELP , "< INFO>[=< FILE> ]" ) ,
16281628 opt( Stable , FlagMulti , "g" , "" , "Equivalent to -C debuginfo=2" , "" ) ,
16291629 opt( Stable , FlagMulti , "O" , "" , "Equivalent to -C opt-level=3" , "" ) ,
1630- opt( Stable , Opt , "o" , "" , "Write output to <filename>" , "FILENAME" ) ,
1631- opt( Stable , Opt , "" , "out-dir" , "Write output to compiler-chosen filename in <dir>" , "DIR" ) ,
1630+ opt( Stable , Opt , "o" , "" , "Write output to <FILENAME>" , "<FILENAME>" ) ,
1631+ opt(
1632+ Stable ,
1633+ Opt ,
1634+ "" ,
1635+ "out-dir" ,
1636+ "Write output to compiler-chosen filename in <DIR>" ,
1637+ "<DIR>" ,
1638+ ) ,
16321639 opt(
16331640 Stable ,
16341641 Opt ,
16351642 "" ,
16361643 "explain" ,
16371644 "Provide a detailed explanation of an error message" ,
1638- "OPT" ,
1645+ "< OPT> " ,
16391646 ) ,
16401647 opt( Stable , Flag , "" , "test" , "Build a test harness" , "" ) ,
1641- opt( Stable , Opt , "" , "target" , "Target triple for which the code is compiled" , "TARGET" ) ,
1642- opt( Stable , Multi , "A" , "allow" , "Set lint allowed" , "LINT" ) ,
1643- opt( Stable , Multi , "W" , "warn" , "Set lint warnings" , "LINT" ) ,
1644- opt( Stable , Multi , "" , "force-warn" , "Set lint force-warn" , "LINT" ) ,
1645- opt( Stable , Multi , "D" , "deny" , "Set lint denied" , "LINT" ) ,
1646- opt( Stable , Multi , "F" , "forbid" , "Set lint forbidden" , "LINT" ) ,
1648+ opt( Stable , Opt , "" , "target" , "Target triple for which the code is compiled" , "< TARGET> " ) ,
1649+ opt( Stable , Multi , "A" , "allow" , "Set lint allowed" , "< LINT> " ) ,
1650+ opt( Stable , Multi , "W" , "warn" , "Set lint warnings" , "< LINT> " ) ,
1651+ opt( Stable , Multi , "" , "force-warn" , "Set lint force-warn" , "< LINT> " ) ,
1652+ opt( Stable , Multi , "D" , "deny" , "Set lint denied" , "< LINT> " ) ,
1653+ opt( Stable , Multi , "F" , "forbid" , "Set lint forbidden" , "< LINT> " ) ,
16471654 opt(
16481655 Stable ,
16491656 Multi ,
16501657 "" ,
16511658 "cap-lints" ,
16521659 "Set the most restrictive lint level. More restrictive lints are capped at this level" ,
1653- "LEVEL" ,
1660+ "< LEVEL> " ,
16541661 ) ,
1655- opt( Stable , Multi , "C" , "codegen" , "Set a codegen option" , "OPT[= VALUE]" ) ,
1662+ opt( Stable , Multi , "C" , "codegen" , "Set a codegen option" , "< OPT>[=< VALUE> ]" ) ,
16561663 opt( Stable , Flag , "V" , "version" , "Print version info and exit" , "" ) ,
16571664 opt( Stable , Flag , "v" , "verbose" , "Use verbose output" , "" ) ,
16581665 ] ;
@@ -1666,47 +1673,47 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
16661673 "" ,
16671674 "extern" ,
16681675 "Specify where an external rust library is located" ,
1669- "NAME[= PATH]" ,
1676+ "< NAME>[=< PATH> ]" ,
16701677 ) ,
1671- opt ( Stable , Opt , "" , "sysroot" , "Override the system root" , "PATH" ) ,
1672- opt ( Unstable , Multi , "Z" , "" , "Set unstable / perma-unstable options" , "FLAG" ) ,
1678+ opt ( Stable , Opt , "" , "sysroot" , "Override the system root" , "< PATH> " ) ,
1679+ opt ( Unstable , Multi , "Z" , "" , "Set unstable / perma-unstable options" , "< FLAG> " ) ,
16731680 opt (
16741681 Stable ,
16751682 Opt ,
16761683 "" ,
16771684 "error-format" ,
16781685 "How errors and other messages are produced" ,
1679- "human|json|short" ,
1686+ "< human|json|short> " ,
16801687 ) ,
1681- opt ( Stable , Multi , "" , "json" , "Configure the JSON output of the compiler" , "CONFIG" ) ,
1688+ opt ( Stable , Multi , "" , "json" , "Configure the JSON output of the compiler" , "< CONFIG> " ) ,
16821689 opt (
16831690 Stable ,
16841691 Opt ,
16851692 "" ,
16861693 "color" ,
16871694 "Configure coloring of output:
1688- auto = colorize, if output goes to a tty (default);
1689- always = always colorize output;
1690- never = never colorize output" ,
1691- "auto|always|never" ,
1695+ * auto = colorize, if output goes to a tty (default);
1696+ * always = always colorize output;
1697+ * never = never colorize output" ,
1698+ "< auto|always|never> " ,
16921699 ) ,
16931700 opt (
16941701 Stable ,
16951702 Opt ,
16961703 "" ,
16971704 "diagnostic-width" ,
16981705 "Inform rustc of the width of the output so that diagnostics can be truncated to fit" ,
1699- "WIDTH" ,
1706+ "< WIDTH> " ,
17001707 ) ,
17011708 opt (
17021709 Stable ,
17031710 Multi ,
17041711 "" ,
17051712 "remap-path-prefix" ,
17061713 "Remap source names in all output (compiler messages and output files)" ,
1707- "FROM=TO " ,
1714+ "< FROM>=<TO> " ,
17081715 ) ,
1709- opt ( Unstable , Multi , "" , "env-set" , "Inject an environment variable" , "VAR= VALUE" ) ,
1716+ opt ( Unstable , Multi , "" , "env-set" , "Inject an environment variable" , "< VAR>=< VALUE> " ) ,
17101717 ] ;
17111718 options. extend ( verbose_only. into_iter ( ) . map ( |mut opt| {
17121719 opt. is_verbose_help_only = true ;
@@ -2706,7 +2713,7 @@ pub fn make_crate_type_option() -> RustcOptGroup {
27062713 "crate-type" ,
27072714 "Comma separated list of types of crates
27082715 for the compiler to emit" ,
2709- "[ bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] " ,
2716+ "< bin|lib|rlib|dylib|cdylib|staticlib|proc-macro> " ,
27102717 )
27112718}
27122719
0 commit comments