added try_find_description
to distinguish no desc from invalid code
This commit is contained in:
parent
e9bca510fe
commit
5f3ffee6b7
5 changed files with 42 additions and 17 deletions
|
@ -786,8 +786,12 @@ impl HandlerInner {
|
|||
.emitted_diagnostic_codes
|
||||
.iter()
|
||||
.filter_map(|x| match &x {
|
||||
DiagnosticId::Error(s) if registry.find_description(s).is_some() => {
|
||||
Some(s.clone())
|
||||
DiagnosticId::Error(s) => {
|
||||
if let Ok(Some(_explanation)) = registry.try_find_description(s) {
|
||||
Some(s.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue