about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-18 21:19:39 +0000
committerbors <bors@rust-lang.org>2025-06-18 21:19:39 +0000
commit044514eb26511d2d8aa999fdf27e85df6beb6576 (patch)
treefb5c0b63b1bbee2e9a2615a9c985d4dc62e2b8f0 /src/tools/compiletest
parentc68340350c78eea402c4a85f8d9c1b7d3d607635 (diff)
parent663939dfb0d20a4de47d755b8f8fd1af44aac80f (diff)
downloadrust-044514eb26511d2d8aa999fdf27e85df6beb6576.tar.gz
rust-044514eb26511d2d8aa999fdf27e85df6beb6576.zip
Auto merge of #142689 - Urgau:rollup-4ho6835, r=Urgau
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#135656 (Add `-Z hint-mostly-unused` to tell rustc that most of a crate will go unused)
 - rust-lang/rust#138237 (Get rid of `EscapeDebugInner`.)
 - rust-lang/rust#141614 (lint direct use of rustc_type_ir )
 - rust-lang/rust#142123 (Implement initial support for timing sections (`--json=timings`))
 - rust-lang/rust#142377 (Try unremapping compiler sources)
 - rust-lang/rust#142674 (remove duplicate crash test)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index e9b8b6bda3f..42c851ea999 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2372,6 +2372,12 @@ impl<'test> TestCx<'test> {
             rust_src_dir.read_link_utf8().unwrap_or_else(|_| rust_src_dir.to_path_buf());
         normalize_path(&rust_src_dir.join("library"), "$SRC_DIR_REAL");
 
+        // Real paths into the compiler
+        let rustc_src_dir = &self.config.sysroot_base.join("lib/rustlib/rustc-src/rust");
+        rustc_src_dir.try_exists().expect(&*format!("{} should exists", rustc_src_dir));
+        let rustc_src_dir = rustc_src_dir.read_link_utf8().unwrap_or(rustc_src_dir.to_path_buf());
+        normalize_path(&rustc_src_dir.join("compiler"), "$COMPILER_DIR_REAL");
+
         // eg.
         // /home/user/rust/build/x86_64-unknown-linux-gnu/test/ui/<test_dir>/$name.$revision.$mode/
         normalize_path(&self.output_base_dir(), "$TEST_BUILD_DIR");