about summary refs log tree commit diff
path: root/compiler/rustc_session/src/parse.rs
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-05-25 20:42:13 -0500
committerjyn <github@jyn.dev>2023-05-26 12:16:30 -0500
commit157d936c31e4f5ff51cc6f20c748e16537f33b9c (patch)
tree1ce181b08b9fee921b6452a27c8be26b5bf66fd7 /compiler/rustc_session/src/parse.rs
parenteb9da7bfa375ad58bcb946115f3191a2756785e5 (diff)
downloadrust-157d936c31e4f5ff51cc6f20c748e16537f33b9c.tar.gz
rust-157d936c31e4f5ff51cc6f20c748e16537f33b9c.zip
Stop normalizing so many different prefixes
Previously, we would normalize *all* of
- the absolute path to the repository checkout
- the /rustc/$sha for stage1 (if `remap-debuginfo` was enabled)
- the /rustc/$sha for download-rustc
- the sysroot for download-rustc

Now, we consistently only normalize /rustc/FAKE_PREFIX. Not only is this
much simpler, but it also avoids ongoing maintenance for download-rustc
and makes it much less likely that tests break by accident.

- Change `tests/ui/track-diagnostics/track6.rs` to use a relative path
  instead of an absolute one. I am not actually sure why `track_caller`
works here, but it does seem to work :shrug:

- Pass `-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX` to all
  suites, not just UI. In particular, mir-opt tests emit /rustc/ paths
  in their output.
Diffstat (limited to 'compiler/rustc_session/src/parse.rs')
-rw-r--r--compiler/rustc_session/src/parse.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index 7b396dde91b..0184fec8e3e 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -84,6 +84,7 @@ impl SymbolGallery {
 
 /// Construct a diagnostic for a language feature error due to the given `span`.
 /// The `feature`'s `Symbol` is the one you used in `active.rs` and `rustc_span::symbols`.
+#[track_caller]
 pub fn feature_err(
     sess: &ParseSess,
     feature: Symbol,