Add parser test

This commit is contained in:
mejrs 2022-10-30 13:55:13 +01:00
parent fae0be5d50
commit 0f35c0c672
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// 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:LL:CC"
}

View File

@ -0,0 +1,9 @@
error: unexpected closing delimiter: `}`
--> $DIR/track5.rs:LL:CC
|
LL | }
| ^ unexpected closing delimiter
-Ztrack-diagnostics: created at compiler/rustc_parse/src/lexer/tokentrees.rs:LL:CC
error: aborting due to previous error