diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2025-04-14 14:16:30 +0100 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2025-04-14 14:52:27 +0100 |
| commit | 1b46969a11b2cfa000593b225af94a9d3bfbedfc (patch) | |
| tree | afef0f83ad320765de4e94e395315ece8aae0900 /compiler/rustc_session/src | |
| parent | 5961e5ba3daa20d98f549eb9029105ae50c13aed (diff) | |
| download | rust-1b46969a11b2cfa000593b225af94a9d3bfbedfc.tar.gz rust-1b46969a11b2cfa000593b225af94a9d3bfbedfc.zip | |
Specify `--print info=file` syntax in `--help`
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index bdd54a15147..fc05470d941 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1560,9 +1560,10 @@ The default is {DEFAULT_EDITION} and the latest stable edition is {LATEST_STABLE ) }); -static PRINT_KINDS_STRING: LazyLock<String> = LazyLock::new(|| { +static PRINT_HELP: LazyLock<String> = LazyLock::new(|| { format!( - "[{}]", + "Compiler information to print on stdout (or to a file)\n\ + INFO may be one of ({}).", PRINT_KINDS.iter().map(|(name, _)| format!("{name}")).collect::<Vec<_>>().join("|") ) }); @@ -1621,14 +1622,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> { "Comma separated list of types of output for the compiler to emit", "[asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]", ), - opt( - Stable, - Multi, - "", - "print", - "Compiler information to print on stdout", - &PRINT_KINDS_STRING, - ), + opt(Stable, Multi, "", "print", &PRINT_HELP, "INFO[=FILE]"), opt(Stable, FlagMulti, "g", "", "Equivalent to -C debuginfo=2", ""), opt(Stable, FlagMulti, "O", "", "Equivalent to -C opt-level=3", ""), opt(Stable, Opt, "o", "", "Write output to <filename>", "FILENAME"), |
