Skip to content

Commit 48edc83

Browse files
author
mejrs
committed
Add more normalization and tests
1 parent beae0d2 commit 48edc83

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/ui/track-diagnostics.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// compile-flags: -Z track-diagnostics
22
// error-pattern: created at
33

4+
// Normalize the emitted location so this doesn't need
5+
// updating everytime someone adds or removes a line.
6+
// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:$$LINE::$$COL"
7+
48
struct A;
59
struct B;
610
const S: A = B;

tests/ui/track-diagnostics.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
error[E0308]: mismatched types
2-
--> $DIR/track-diagnostics.rs:6:14
2+
--> $DIR/track-diagnostics.rs:$LINE::$COL
33
|
44
LL | const S: A = B;
55
| ^ expected struct `A`, found struct `B`
6-
-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:2275:31
6+
-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:$LINE::$COL
77

88
error: aborting due to previous error
99

0 commit comments

Comments
 (0)