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 | 26255186e2e94e0fe62cfd0965662494b6aab27c (patch) | |
| tree | 0f067abfaeeada0568afcf197354b77720efd87c /src/librustdoc/passes/lint/check_code_block_syntax.rs | |
| parent | a8e37507f4815c789a6fcb204f209806a4c3952d (diff) | |
| download | rust-26255186e2e94e0fe62cfd0965662494b6aab27c.tar.gz rust-26255186e2e94e0fe62cfd0965662494b6aab27c.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>
Diffstat (limited to 'src/librustdoc/passes/lint/check_code_block_syntax.rs')
| -rw-r--r-- | src/librustdoc/passes/lint/check_code_block_syntax.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/passes/lint/check_code_block_syntax.rs b/src/librustdoc/passes/lint/check_code_block_syntax.rs index 71f922662da..26fbb03a43e 100644 --- a/src/librustdoc/passes/lint/check_code_block_syntax.rs +++ b/src/librustdoc/passes/lint/check_code_block_syntax.rs @@ -33,8 +33,10 @@ fn check_rust_syntax( code_block: RustCodeBlock, ) { let buffer = Lrc::new(Lock::new(Buffer::default())); - 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 = BufferEmitter { buffer: Lrc::clone(&buffer), fallback_bundle }; let sm = Lrc::new(SourceMap::new(FilePathMapping::empty())); |
