We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 406d4a9 commit 0bb6bc4Copy full SHA for 0bb6bc4
compiler/rustc_driver/src/lib.rs
@@ -528,8 +528,12 @@ fn stderr_isatty() -> bool {
528
}
529
530
fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) {
531
- let normalised =
532
- if code.starts_with('E') { code.to_string() } else { format!("E{0:0>4}", code) };
+ let upper_cased_code = code.to_ascii_uppercase();
+ let normalised = if upper_cased_code.starts_with('E') {
533
+ upper_cased_code
534
+ } else {
535
+ format!("E{0:0>4}", code)
536
+ };
537
match registry.try_find_description(&normalised) {
538
Ok(Some(description)) => {
539
let mut is_in_code_block = false;
0 commit comments