diff options
| author | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-03-19 18:45:16 +0800 |
|---|---|---|
| committer | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-03-19 18:48:00 +0800 |
| commit | 5a52b5d92aec9427b40aee6a20093eb822702402 (patch) | |
| tree | 6c2729c6cbfc198abb4b06b04a53ee79b645deac /compiler/rustc_session/src | |
| parent | 9bad8ac498985707f29b0bdc0293cc0457a3ab38 (diff) | |
Suggest `-Whelp` when pass `--print lints` to rustc
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
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() } |
