Skip to content

Commit dd5aeec

Browse files
committed
[RFC 3127 - Trim Paths]: Add test for -Zremap-path-scope=diagnostics
1 parent ba035ed commit dd5aeec

4 files changed

+22
-1
lines changed

tests/ui/errors/remap-path-prefix.stderr renamed to tests/ui/errors/remap-path-prefix.normal.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0425]: cannot find value `ferris` in this scope
2-
--> remapped/errors/remap-path-prefix.rs:16:5
2+
--> remapped/errors/remap-path-prefix.rs:19:5
33
|
44
LL | ferris
55
| ^^^^^^ not found in this scope

tests/ui/errors/remap-path-prefix.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// revisions: normal with-diagnostic-scope without-diagnostic-scope
12
// compile-flags: --remap-path-prefix={{src-base}}=remapped
3+
// [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics
4+
// [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object
25
// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
36

47
// The remapped paths are not normalized by compiletest.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0425]: cannot find value `ferris` in this scope
2+
--> remapped/errors/remap-path-prefix.rs:19:5
3+
|
4+
LL | ferris
5+
| ^^^^^^ not found in this scope
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0425`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0425]: cannot find value `ferris` in this scope
2+
--> $DIR/remap-path-prefix.rs:19:5
3+
|
4+
LL | ferris
5+
| ^^^^^^ not found in this scope
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0425`.

0 commit comments

Comments
 (0)