diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-26 12:05:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-26 12:05:00 +0100 |
| commit | edd27cf4ca391dcbdf48269e8dae41ea00d7699a (patch) | |
| tree | a635552c0008e457570b1f193ce93ae19889e1a2 /compiler/rustc_errors/src/json.rs | |
| parent | be23b326dcf00c43aaa48670a073650b3fc33612 (diff) | |
| parent | 53044158eff0d64673a6100f701c57b484232aca (diff) | |
| download | rust-edd27cf4ca391dcbdf48269e8dae41ea00d7699a.tar.gz rust-edd27cf4ca391dcbdf48269e8dae41ea00d7699a.zip | |
Rollup merge of #108482 - Ezrashaw:force-error-docs, r=GuillaumeGomez
statically guarantee that current error codes are documented Closes #61137 (that's right!) Pretty simple refactor (often just a change from `Result<Option<&str>>` to `Result<&str>`) r? `@GuillaumeGomez` (could you specially look at 53044158eff0d64673a6100f701c57b484232aca? I believe you wrote that in the first place, just want to make sure you're happy with the change)
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index e475fc725c3..f32d6b96b9b 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -580,7 +580,7 @@ impl DiagnosticCode { let je_result = je.registry.as_ref().map(|registry| registry.try_find_description(&s)).unwrap(); - DiagnosticCode { code: s, explanation: je_result.unwrap_or(None) } + DiagnosticCode { code: s, explanation: je_result.ok() } }) } } |
