Skip to content

Commit ab69a2a

Browse files
committed
various: translation resources from cg backend
Extend `CodegenBackend` trait with a function returning the translation resources from the codegen backend, which can be added to the complete list of resources provided to the emitter. Signed-off-by: David Wood <[email protected]>
1 parent aa0e543 commit ab69a2a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

clippy_lints/src/doc.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,10 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
704704
let filename = FileName::anon_source_code(&code);
705705

706706
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
707-
let fallback_bundle =
708-
rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES, false);
707+
let fallback_bundle = rustc_errors::fallback_fluent_bundle(
708+
rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(),
709+
false
710+
);
709711
let emitter = EmitterWriter::new(
710712
Box::new(io::sink()),
711713
None,

src/driver.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ 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_driver::DEFAULT_LOCALE_RESOURCES, false);
212+
let fallback_bundle = rustc_errors::fallback_fluent_bundle(
213+
rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(),
214+
false
215+
);
213216
let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr(
214217
rustc_errors::ColorConfig::Auto,
215218
None,

0 commit comments

Comments
 (0)