Rollup merge of #138700 - xizheyin:issue-138612, r=Nadrieril
Suggest `-Whelp` when pass `--print lints` to rustc Closes #138612
This commit is contained in:
commit
28fc422f30
4 changed files with 15 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue