about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-08-28 14:24:13 +1000
committerZalathar <Zalathar@users.noreply.github.com>2025-08-29 13:11:27 +1000
commitc80cadee6424ac5ad8fe017c4ea0b18a5bff4b56 (patch)
treeafed8685ca6ccf58328eaa164867df64da258b39 /src
parent269db62491b43be6292af0fdabb84a1eb6c77c5d (diff)
downloadrust-c80cadee6424ac5ad8fe017c4ea0b18a5bff4b56.tar.gz
rust-c80cadee6424ac5ad8fe017c4ea0b18a5bff4b56.zip
Move module `compute_diff` into `compiletest::runtest`
The code in this module is always called in the context of running an
individual tests, and sometimes prints output that needs to be captured.

Moving this module into `runtest` will make it easier to find and audit all of
the print statements that need to be updated when overhauling output-capture.
Diffstat (limited to 'src')
-rw-r--r--src/tools/compiletest/src/lib.rs1
-rw-r--r--src/tools/compiletest/src/runtest.rs6
-rw-r--r--src/tools/compiletest/src/runtest/compute_diff.rs (renamed from src/tools/compiletest/src/compute_diff.rs)0
-rw-r--r--src/tools/compiletest/src/runtest/mir_opt.rs2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs
index 91ab40edc60..8737fec80bb 100644
--- a/src/tools/compiletest/src/lib.rs
+++ b/src/tools/compiletest/src/lib.rs
@@ -9,7 +9,6 @@
 mod tests;
 
 pub mod common;
-pub mod compute_diff;
 mod debuggers;
 pub mod diagnostics;
 pub mod directives;
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index aa463d7b255..eea471bc6cb 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -21,15 +21,13 @@ use crate::common::{
     UI_WINDOWS_SVG, expected_output_path, incremental_dir, output_base_dir, output_base_name,
     output_testname_unique,
 };
-use crate::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
 use crate::directives::TestProps;
 use crate::errors::{Error, ErrorKind, load_errors};
 use crate::read2::{Truncated, read2_abbreviated};
+use crate::runtest::compute_diff::{DiffLine, make_diff, write_diff, write_filtered_diff};
 use crate::util::{Utf8PathBufExt, add_dylib_path, static_regex};
 use crate::{ColorConfig, help, json, stamp_file_path, warning};
 
-mod debugger;
-
 // Helper modules that implement test running logic for each test suite.
 // tidy-alphabetical-start
 mod assembly;
@@ -48,6 +46,8 @@ mod rustdoc_json;
 mod ui;
 // tidy-alphabetical-end
 
+mod compute_diff;
+mod debugger;
 #[cfg(test)]
 mod tests;
 
diff --git a/src/tools/compiletest/src/compute_diff.rs b/src/tools/compiletest/src/runtest/compute_diff.rs
index 509e7e11703..509e7e11703 100644
--- a/src/tools/compiletest/src/compute_diff.rs
+++ b/src/tools/compiletest/src/runtest/compute_diff.rs
diff --git a/src/tools/compiletest/src/runtest/mir_opt.rs b/src/tools/compiletest/src/runtest/mir_opt.rs
index efdb131bf14..55043bf4bc2 100644
--- a/src/tools/compiletest/src/runtest/mir_opt.rs
+++ b/src/tools/compiletest/src/runtest/mir_opt.rs
@@ -6,7 +6,7 @@ use miropt_test_tools::{MiroptTest, MiroptTestFile, files_for_miropt_test};
 use tracing::debug;
 
 use super::{Emit, TestCx, WillExecute};
-use crate::compute_diff::write_diff;
+use crate::runtest::compute_diff::write_diff;
 
 impl TestCx<'_> {
     pub(super) fn run_mir_opt_test(&self) {