diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-06-19 05:02:35 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-06-19 05:02:35 +0000 |
| commit | 3e93254d5e2efb3d2dd738833142de9274c7b191 (patch) | |
| tree | 6ad18502b12564bac17108d771d900947abbefcb /compiler/rustc_parse/src/parser/tests.rs | |
| parent | d9f1d557860138da64d52c0f536db395a99b9a4a (diff) | |
| parent | 2a6a42329f79d3c2a42f23ca9fb68aba511a2bc1 (diff) | |
| download | rust-3e93254d5e2efb3d2dd738833142de9274c7b191.tar.gz rust-3e93254d5e2efb3d2dd738833142de9274c7b191.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_parse/src/parser/tests.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/tests.rs b/compiler/rustc_parse/src/parser/tests.rs index 79a6cf1b541..3a4690670af 100644 --- a/compiler/rustc_parse/src/parser/tests.rs +++ b/compiler/rustc_parse/src/parser/tests.rs @@ -61,7 +61,7 @@ where { let mut p = string_to_parser(&psess, s); let x = f(&mut p).unwrap(); - p.psess.dcx.abort_if_errors(); + p.dcx().abort_if_errors(); x } @@ -193,7 +193,7 @@ impl<T: Write> Write for Shared<T> { #[allow(rustc::untranslatable_diagnostic)] // no translation needed for tests fn test_harness(file_text: &str, span_labels: Vec<SpanLabel>, expected_output: &str) { create_default_session_globals_then(|| { - let (handler, source_map, output) = create_test_handler(); + let (dcx, source_map, output) = create_test_handler(); source_map.new_source_file(Path::new("test.rs").to_owned().into(), file_text.to_owned()); let primary_span = make_span(&file_text, &span_labels[0].start, &span_labels[0].end); @@ -205,7 +205,7 @@ fn test_harness(file_text: &str, span_labels: Vec<SpanLabel>, expected_output: & println!("text: {:?}", source_map.span_to_snippet(span)); } - handler.span_err(msp, "foo"); + dcx.handle().span_err(msp, "foo"); assert!( expected_output.chars().next() == Some('\n'), |
