mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
1d9162bced
Implement RFC3137 trim-paths sysroot changes - take 2 This PR is a continuation of https://github.com/rust-lang/rust/pull/118149. Nothing really changed, except for https://github.com/rust-lang/rust/pull/129408 which I was able to trigger locally. Original description: > Implement parts of #111540 > > Right now, backtraces into sysroot always shows /rustc/$hash in diagnostics, e.g. > > ``` > thread 'main' panicked at 'hello world', map-panic.rs:2:50 > stack backtrace: > 0: std::panicking::begin_panic > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12 > 1: map_panic::main::{{closure}} > at ./map-panic.rs:2:50 > 2: core::option::Option<T>::map > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29 > 3: map_panic::main > at ./map-panic.rs:2:30 > 4: core::ops::function::FnOnce::call_once > at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5 > note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. > ``` > > [RFC 3127 said](https://rust-lang.github.io/rfcs/3127-trim-paths.html#changing-handling-of-sysroot-path-in-rustc) > > > We want to change this behaviour such that, when rust-src source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a --remap-path-prefix that causes this local path to be remapped in the usual way. > > This PR implements this behaviour. When `rust-src` is present at compile time, rustc replaces /rustc/$hash with a real path into local rust-src with best effort. To sanitise this, users must explicitly supply `--remap-path-prefix=<path to rust-src>=foo`. cc `@cbeuw` Fix #105907 Fix #85463 try-job: dist-x86_64-linux try-job: x86_64-msvc try-job: dist-x86_64-msvc try-job: armhf-gnu |
||
---|---|---|
.. | ||
auxiliary | ||
trait-bound-error-spans | ||
traits | ||
dynless-turbofish-e0191-issue-91997.rs | ||
dynless-turbofish-e0191-issue-91997.stderr | ||
issue-89280-emitter-overflow-splice-lines.rs | ||
issue-89280-emitter-overflow-splice-lines.stderr | ||
issue-99572-impl-trait-on-pointer.rs | ||
issue-99572-impl-trait-on-pointer.stderr | ||
issue-104621-extern-bad-file.rs | ||
issue-104621-extern-bad-file.stderr | ||
issue-104621-extern-not-file.rs | ||
issue-104621-extern-not-file.stderr | ||
pic-linker.rs | ||
remap-path-prefix-macro.normal.run.stdout | ||
remap-path-prefix-macro.rs | ||
remap-path-prefix-macro.with-macro-scope.run.stdout | ||
remap-path-prefix-macro.without-macro-scope.run.stdout | ||
remap-path-prefix-reverse.local-self.stderr | ||
remap-path-prefix-reverse.remapped-self.stderr | ||
remap-path-prefix-reverse.rs | ||
remap-path-prefix-sysroot.rs | ||
remap-path-prefix-sysroot.with-remap.stderr | ||
remap-path-prefix-sysroot.without-remap.stderr | ||
remap-path-prefix.normal.stderr | ||
remap-path-prefix.rs | ||
remap-path-prefix.with-diagnostic-scope.stderr | ||
remap-path-prefix.without-diagnostic-scope.stderr | ||
wrong-target-spec.rs | ||
wrong-target-spec.stderr |