errors: generate typed identifiers in each crate
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
f9216b7564
commit
d1fcf61117
151 changed files with 1721 additions and 1440 deletions
|
@ -73,6 +73,9 @@ extern crate tracing;
|
|||
#[macro_use]
|
||||
extern crate smallvec;
|
||||
|
||||
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
|
||||
use rustc_macros::fluent_messages;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
@ -105,3 +108,5 @@ pub mod util {
|
|||
|
||||
// Allows macros to refer to this crate as `::rustc_middle`
|
||||
extern crate self as rustc_middle;
|
||||
|
||||
fluent_messages! { "../locales/en-US.ftl" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue