refactor: statically guarantee that current error codes are documented
This commit is contained in:
parent
70fd012439
commit
90677edcba
8 changed files with 33 additions and 67 deletions
|
@ -1477,9 +1477,7 @@ impl HandlerInner {
|
|||
.emitted_diagnostic_codes
|
||||
.iter()
|
||||
.filter_map(|x| match &x {
|
||||
DiagnosticId::Error(s)
|
||||
if registry.try_find_description(s).map_or(false, |o| o.is_some()) =>
|
||||
{
|
||||
DiagnosticId::Error(s) if registry.try_find_description(s).is_ok() => {
|
||||
Some(s.clone())
|
||||
}
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue