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 /compiler/rustc_errors/src/json/tests.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 'compiler/rustc_errors/src/json/tests.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json/tests.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs index bbfad26c6f0..671dc449eaa 100644 --- a/compiler/rustc_errors/src/json/tests.rs +++ b/compiler/rustc_errors/src/json/tests.rs @@ -42,11 +42,11 @@ impl<T: Write> Write for Shared<T> { /// Test the span yields correct positions in JSON. fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) { - static TEST_LOCALE_RESOURCES: &[&str] = &[crate::DEFAULT_LOCALE_RESOURCE]; rustc_span::create_default_session_globals_then(|| { let sm = Lrc::new(SourceMap::new(FilePathMapping::empty())); sm.new_source_file(Path::new("test.rs").to_owned().into(), code.to_owned()); - let fallback_bundle = crate::fallback_fluent_bundle(TEST_LOCALE_RESOURCES, false); + let fallback_bundle = + crate::fallback_fluent_bundle(vec![crate::DEFAULT_LOCALE_RESOURCE], false); let output = Arc::new(Mutex::new(Vec::new())); let je = JsonEmitter::new( | 
