diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-20 15:36:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-20 15:36:19 +0100 |
| commit | 28fc422f30c80aedfa6c4dc52e3f457846c02856 (patch) | |
| tree | ca18302495211e392ea12937ea1619747a0abf90 /compiler/rustc_session/src | |
| parent | 915576935af08106f302829295a5ebcd4a530f89 (diff) | |
| parent | 5a52b5d92aec9427b40aee6a20093eb822702402 (diff) | |
Rollup merge of #138700 - xizheyin:issue-138612, r=Nadrieril
Suggest `-Whelp` when pass `--print lints` to rustc Closes #138612
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 701d06e4fd4..43b78423c72 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -2082,6 +2082,12 @@ fn emit_unknown_print_request_help(early_dcx: &EarlyDiagCtxt, req: &str) -> ! { let mut diag = early_dcx.early_struct_fatal(format!("unknown print request: `{req}`")); #[allow(rustc::diagnostic_outside_of_impl)] diag.help(format!("valid print requests are: {prints}")); + + if req == "lints" { + diag.help(format!("use `-Whelp` to print a list of lints")); + } + + diag.help(format!("for more information, see the rustc book: https://doc.rust-lang.org/rustc/command-line-arguments.html#--print-print-compiler-information")); diag.emit() } |
