diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-06 21:56:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-06 21:56:28 +0100 |
| commit | 79e5424e313cb6fc725f738a4ac1d3220932d3cd (patch) | |
| tree | c3340df191c21a43c9d8dccec48dfda6ba6ac9ed /compiler/rustc_parse/src | |
| parent | 3eb1ef836eaece6dd52ce0b27f9983b8c6b20ee1 (diff) | |
| parent | b9b2c3affcc51e85d793f51875db067513642863 (diff) | |
| download | rust-79e5424e313cb6fc725f738a4ac1d3220932d3cd.tar.gz rust-79e5424e313cb6fc725f738a4ac1d3220932d3cd.zip | |
Rollup merge of #136636 - bjorn3:error_cleanup, r=compiler-errors
Couple of minor cleanups to the diagnostic infrastructure
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tests.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_parse/src/parser/tests.rs b/compiler/rustc_parse/src/parser/tests.rs index 76b7dc0e48a..8b8c81a77a0 100644 --- a/compiler/rustc_parse/src/parser/tests.rs +++ b/compiler/rustc_parse/src/parser/tests.rs @@ -26,7 +26,7 @@ use crate::parser::{ForceCollect, Parser}; use crate::{new_parser_from_source_str, source_str_to_stream, unwrap_or_emit_fatal}; fn psess() -> ParseSess { - ParseSess::new(vec![crate::DEFAULT_LOCALE_RESOURCE, crate::DEFAULT_LOCALE_RESOURCE]) + ParseSess::new(vec![crate::DEFAULT_LOCALE_RESOURCE]) } /// Map string to parser (via tts). @@ -41,10 +41,8 @@ fn string_to_parser(psess: &ParseSess, source_str: String) -> Parser<'_> { fn create_test_handler(theme: OutputTheme) -> (DiagCtxt, Arc<SourceMap>, Arc<Mutex<Vec<u8>>>) { let output = Arc::new(Mutex::new(Vec::new())); let source_map = Arc::new(SourceMap::new(FilePathMapping::empty())); - let fallback_bundle = rustc_errors::fallback_fluent_bundle( - vec![crate::DEFAULT_LOCALE_RESOURCE, crate::DEFAULT_LOCALE_RESOURCE], - false, - ); + let fallback_bundle = + rustc_errors::fallback_fluent_bundle(vec![crate::DEFAULT_LOCALE_RESOURCE], false); let mut emitter = HumanEmitter::new(Box::new(Shared { data: output.clone() }), fallback_bundle) .sm(Some(source_map.clone())) .diagnostic_width(Some(140)); |
