Skip to content

Commit 2d5b852

Browse files
authored
Rollup merge of #142377 - Urgau:unremap-rustc-dev, r=jieyouxu
Try unremapping compiler sources See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083). This PR is a follow-up to rust-lang/rust#141751 regarding the compiler side. Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang/rust#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory). Best reviewed commit by commit. cc ``@samueltardieu`` r? ``@jieyouxu``
2 parents 42bdf69 + cb503e8 commit 2d5b852

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tests/ui.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ Compiletest makes the following replacements on the compiler output:
113113
- The base directory where the test's output goes is replaced with
114114
`$TEST_BUILD_DIR`. This only comes up in a few rare circumstances. Example:
115115
`/path/to/rust/build/x86_64-unknown-linux-gnu/test/ui`
116+
- The real directory to the standard library source is replaced with `$SRC_DIR_REAL`.
117+
- The real directory to the compiler source is replaced with `$COMPILER_DIR_REAL`.
116118
- Tabs are replaced with `\t`.
117119
- Backslashes (`\`) are converted to forward slashes (`/`) within paths (using a
118120
heuristic). This helps normalize differences with Windows-style paths.

0 commit comments

Comments
 (0)