Skip to content

Commit aa0e543

Browse files
committed
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 <[email protected]>
1 parent 71b8646 commit aa0e543

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
705705

706706
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
707707
let fallback_bundle =
708-
rustc_errors::fallback_fluent_bundle(rustc_errors::DEFAULT_LOCALE_RESOURCES, false);
708+
rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES, false);
709709
let emitter = EmitterWriter::new(
710710
Box::new(io::sink()),
711711
None,

src/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
209209
// Separate the output with an empty line
210210
eprintln!();
211211

212-
let fallback_bundle = rustc_errors::fallback_fluent_bundle(rustc_errors::DEFAULT_LOCALE_RESOURCES, false);
212+
let fallback_bundle = rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES, false);
213213
let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr(
214214
rustc_errors::ColorConfig::Auto,
215215
None,

0 commit comments

Comments
 (0)