Make error code registration work again. #19624
This commit is contained in:
parent
a0f86de497
commit
953d6dfd7e
11 changed files with 128 additions and 80 deletions
|
@ -65,6 +65,13 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt,
|
|||
}
|
||||
()
|
||||
});
|
||||
with_registered_diagnostics(|diagnostics| {
|
||||
if !diagnostics.contains_key(&code.name) {
|
||||
ecx.span_err(span, &format!(
|
||||
"used diagnostic code {} not registered", token::get_ident(code).get()
|
||||
)[]);
|
||||
}
|
||||
});
|
||||
MacExpr::new(quote_expr!(ecx, ()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue