diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-06-19 13:02:04 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-06-19 13:02:04 -0500 |
| commit | 07b9bb1855596ac84a80d898b40c4b403f1dcc3f (patch) | |
| tree | ddcf02a1bb7f17cdfa8c0b638977c28ca6acef0c /compiler/rustc_errors/src/json/tests.rs | |
| parent | 8de4c7234dd9b97c9d76b58671343fdbbc9a433e (diff) | |
| download | rust-07b9bb1855596ac84a80d898b40c4b403f1dcc3f.tar.gz rust-07b9bb1855596ac84a80d898b40c4b403f1dcc3f.zip | |
Extract Translator struct
Diffstat (limited to 'compiler/rustc_errors/src/json/tests.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/json/tests.rs b/compiler/rustc_errors/src/json/tests.rs index 40973e8e5d8..8cf81f467d8 100644 --- a/compiler/rustc_errors/src/json/tests.rs +++ b/compiler/rustc_errors/src/json/tests.rs @@ -41,14 +41,14 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) { rustc_span::create_default_session_globals_then(|| { let sm = Arc::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(vec![crate::DEFAULT_LOCALE_RESOURCE], false); + let translator = + Translator::with_fallback_bundle(vec![crate::DEFAULT_LOCALE_RESOURCE], false); let output = Arc::new(Mutex::new(Vec::new())); let je = JsonEmitter::new( Box::new(Shared { data: output.clone() }), Some(sm), - fallback_bundle, + translator, true, // pretty HumanReadableErrorType::Short, ColorConfig::Never, |
