summary refs log tree commit diff
path: root/tests/ui/errors
AgeCommit message (Collapse)AuthorLines
2024-09-29Auto merge of #129687 - Urgau:rfc3127-sysroot-2, r=jieyouxubors-0/+58
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-28remap-path-prefix-sysroot: remap {{src-base}} as wellUrgau-1/+2
This is done to cover the path of the test it-self as it may not live on the same root directory as {{rust-src-base}}, which can be the case if {{rust-src-base}} is coming from a extracted dist build (cc opt-dist)
2024-09-27Implement RFC3137 trim-paths sysroot changesUrgau-0/+57
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-1/+1
2024-07-22rewrite and rename issue-107094 to rmakeOneirical-0/+5
2024-07-22rewrite and rename issue-33329 to ui testOneirical-0/+5
2024-07-09E0191 suggestion correction, inserts turbofish without dyn (#91997)Ashton Hunt-0/+31
2024-05-29rewrite and rename issue-37893 to rmakeOneirical-1/+1
2024-05-29convert fpic to ui testOneirical-0/+12
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-22/+22
2024-01-30Provide more context on derived obligation error primary labelEsteban Küber-28/+28
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote: ``` error[E0277]: the trait bound `i32: Bar` is not satisfied --> f100.rs:6:6 | 6 | <i32 as Foo>::foo(); | ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo` | help: this trait has no implementations, consider adding one --> f100.rs:2:1 | 2 | trait Bar {} | ^^^^^^^^^ note: required for `i32` to implement `Foo` --> f100.rs:3:14 | 3 | impl<T: Bar> Foo for T {} | --- ^^^ ^ | | | unsatisfied trait bound introduced here ``` Fix #40120.
2023-11-24Show number in error message even for one errorNilstrieb-6/+6
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-17[RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=diagnosticsUrgau-1/+22
2023-10-17[RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=macroUrgau-0/+15
2023-02-28Fix error spans for arguments to tuple enum constructorsNathan Fenner-5/+358
2023-02-27Point error span at Some constructor argument when trait resolution failsNathan Fenner-5/+93
2023-02-19Refine error span for trait error into borrowed expressionNathan Fenner-14/+52
2023-01-23Point at specific field in struct literal when trait fulfillment failsNathan Fenner-0/+574
2023-01-16ui tests: Remap test base directory by default.Tim Neumann-16/+12
2023-01-14Heuristically undo path prefix mappings.Tim Neumann-0/+79
Because the compiler produces better diagnostics if it can find the source of (potentially remapped) dependencies.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+130