rust/tests/ui/errors
bors 1d9162bced Auto merge of #129687 - Urgau:rfc3127-sysroot-2, r=jieyouxu
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
2024-09-29 03:04:05 +00:00
..
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
trait-bound-error-spans Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
traits Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
dynless-turbofish-e0191-issue-91997.rs E0191 suggestion correction, inserts turbofish without dyn (#91997) 2024-07-09 17:21:31 -06:00
dynless-turbofish-e0191-issue-91997.stderr Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
issue-89280-emitter-overflow-splice-lines.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89280-emitter-overflow-splice-lines.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99572-impl-trait-on-pointer.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99572-impl-trait-on-pointer.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104621-extern-bad-file.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-104621-extern-bad-file.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104621-extern-not-file.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-104621-extern-not-file.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
pic-linker.rs rewrite and rename issue-37893 to rmake 2024-05-29 11:38:47 -04:00
remap-path-prefix-macro.normal.run.stdout [RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=macro 2023-10-17 10:11:31 +02:00
remap-path-prefix-macro.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
remap-path-prefix-macro.with-macro-scope.run.stdout [RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=macro 2023-10-17 10:11:31 +02:00
remap-path-prefix-macro.without-macro-scope.run.stdout [RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=macro 2023-10-17 10:11:31 +02:00
remap-path-prefix-reverse.local-self.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
remap-path-prefix-reverse.remapped-self.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
remap-path-prefix-reverse.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
remap-path-prefix-sysroot.rs remap-path-prefix-sysroot: remap {{src-base}} as well 2024-09-28 21:50:23 +02:00
remap-path-prefix-sysroot.with-remap.stderr remap-path-prefix-sysroot: remap {{src-base}} as well 2024-09-28 21:50:23 +02:00
remap-path-prefix-sysroot.without-remap.stderr Implement RFC3137 trim-paths sysroot changes 2024-09-27 13:27:54 +02:00
remap-path-prefix.normal.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
remap-path-prefix.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
remap-path-prefix.with-diagnostic-scope.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
remap-path-prefix.without-diagnostic-scope.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
wrong-target-spec.rs rewrite and rename issue-107094 to rmake 2024-07-22 10:12:00 -04:00
wrong-target-spec.stderr rewrite and rename issue-33329 to ui test 2024-07-22 10:11:59 -04:00