diff options
| author | bors <bors@rust-lang.org> | 2023-02-26 12:40:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-26 12:40:05 +0000 |
| commit | c4e0cd966062ca67daed20775f4e8a60c28e57df (patch) | |
| tree | a76fa48fe30ba83326439fadaae6a62890573e4b /compiler/rustc_driver_impl/src | |
| parent | 43ee4d15bf201f72c36abd7f02961df87dead441 (diff) | |
| parent | 9c27fc7d34512a6b3d34247beab4a6ada2476c58 (diff) | |
| download | rust-c4e0cd966062ca67daed20775f4e8a60c28e57df.tar.gz rust-c4e0cd966062ca67daed20775f4e8a60c28e57df.zip | |
Auto merge of #108488 - matthiaskrgr:rollup-i61epcw, r=matthiaskrgr
Rollup of 9 pull requests
Successful merges:
- #107941 (Treat `str` as containing `[u8]` for auto trait purposes)
- #108299 (Require `literal`s for some `(u)int_impl!` parameters)
- #108337 (hir-analysis: make a helpful note)
- #108379 (Add `ErrorGuaranteed` to `hir::{Expr,Ty}Kind::Err` variants)
- #108418 (Replace parse_[sth]_expr with parse_expr_[sth] function names)
- #108424 (rustc_infer: Consolidate obligation elaboration de-duplication)
- #108475 (Fix `VecDeque::shrink_to` and add tests.)
- #108482 (statically guarantee that current error codes are documented)
- #108484 (Remove `from` lang item)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 54bcb154da2..464ddae476a 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -485,7 +485,7 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) { let normalised = if upper_cased_code.starts_with('E') { upper_cased_code } else { format!("E{code:0>4}") }; match registry.try_find_description(&normalised) { - Ok(Some(description)) => { + Ok(description) => { let mut is_in_code_block = false; let mut text = String::new(); // Slice off the leading newline and print. @@ -509,9 +509,6 @@ fn handle_explain(registry: Registry, code: &str, output: ErrorOutputType) { print!("{text}"); } } - Ok(None) => { - early_error(output, &format!("no extended information for {code}")); - } Err(InvalidErrorCode) => { early_error(output, &format!("{code} is not a valid error code")); } |
