diff options
| author | David Wood <david.wood@huawei.com> | 2022-10-17 14:11:26 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2023-02-22 09:15:54 +0000 |
| commit | ab69a2a57b54f1581d2b4e5f097b95f8078740fc (patch) | |
| tree | a208f505abdbe63e0343be5ffb6b70fe92df063b | |
| parent | aa0e543ba0a2760112a3e6cfd69437f59100909a (diff) | |
| download | rust-ab69a2a57b54f1581d2b4e5f097b95f8078740fc.tar.gz rust-ab69a2a57b54f1581d2b4e5f097b95f8078740fc.zip | |
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 <david.wood@huawei.com>
| -rw-r--r-- | clippy_lints/src/doc.rs | 6 | ||||
| -rw-r--r-- | src/driver.rs | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/clippy_lints/src/doc.rs b/clippy_lints/src/doc.rs index 660dd8391a3..6fdb7de25cc 100644 --- a/clippy_lints/src/doc.rs +++ b/clippy_lints/src/doc.rs @@ -704,8 +704,10 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) { let filename = FileName::anon_source_code(&code); let sm = Lrc::new(SourceMap::new(FilePathMapping::empty())); - let fallback_bundle = - rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES, false); + let fallback_bundle = rustc_errors::fallback_fluent_bundle( + rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), + false + ); let emitter = EmitterWriter::new( Box::new(io::sink()), None, diff --git a/src/driver.rs b/src/driver.rs index 45209fb8519..9ac849aecf1 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -209,7 +209,10 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) { // Separate the output with an empty line eprintln!(); - let fallback_bundle = rustc_errors::fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES, false); + let fallback_bundle = rustc_errors::fallback_fluent_bundle( + rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), + false + ); let emitter = Box::new(rustc_errors::emitter::EmitterWriter::stderr( rustc_errors::ColorConfig::Auto, None, |
