Replace diagnostic plugins with macro_rules

This commit is contained in:
Mark Rousskov 2019-09-03 21:15:18 -04:00
parent 74563b4166
commit b437240cee
32 changed files with 87 additions and 351 deletions

View file

@ -1,4 +1,4 @@
register_long_diagnostics! {
register_diagnostics! {
E0511: r##"
Invalid monomorphization of an intrinsic function was used. Erroneous code

View file

@ -256,7 +256,7 @@ impl CodegenBackend for LlvmCodegenBackend {
}
fn diagnostics(&self) -> &[(&'static str, &'static str)] {
&DIAGNOSTICS
&error_codes::DIAGNOSTICS
}
fn target_features(&self, sess: &Session) -> Vec<Symbol> {
@ -425,5 +425,3 @@ impl Drop for ModuleLlvm {
}
}
}
__build_diagnostic_array! { librustc_codegen_llvm, DIAGNOSTICS }