Add more normalization and tests

This commit is contained in:
mejrs 2022-10-24 23:19:48 +02:00
parent beae0d298e
commit 48edc83526
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,10 @@
// compile-flags: -Z track-diagnostics
// error-pattern: created at
// Normalize the emitted location so this doesn't need
// updating everytime someone adds or removes a line.
// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:$$LINE::$$COL"
struct A;
struct B;
const S: A = B;

View file

@ -1,9 +1,9 @@
error[E0308]: mismatched types
--> $DIR/track-diagnostics.rs:6:14
--> $DIR/track-diagnostics.rs:$LINE::$COL
|
LL | const S: A = B;
| ^ expected struct `A`, found struct `B`
-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:2275:31
-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:$LINE::$COL
error: aborting due to previous error