Add test for issue-62894

This commit is contained in:
Yuki Okushi 2020-02-16 02:54:33 +09:00
parent f32447d541
commit ecb8bf069e
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// Regression test for #62894, shouldn't crash.
// error-pattern: this file contains an unclosed delimiter
// error-pattern: expected one of `(`, `[`, or `{`, found keyword `fn`
fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
fn main() {}

View File

@ -0,0 +1,47 @@
error: this file contains an unclosed delimiter
--> $DIR/issue-62894.rs:7:14
|
LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
| - - - unclosed delimiter
| | |
| | unclosed delimiter
| unclosed delimiter
LL |
LL | fn main() {}
| ^
error: this file contains an unclosed delimiter
--> $DIR/issue-62894.rs:7:14
|
LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
| - - - unclosed delimiter
| | |
| | unclosed delimiter
| unclosed delimiter
LL |
LL | fn main() {}
| ^
error: this file contains an unclosed delimiter
--> $DIR/issue-62894.rs:7:14
|
LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
| - - - unclosed delimiter
| | |
| | unclosed delimiter
| unclosed delimiter
LL |
LL | fn main() {}
| ^
error: expected one of `(`, `[`, or `{`, found keyword `fn`
--> $DIR/issue-62894.rs:7:1
|
LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
| - expected one of `(`, `[`, or `{`
LL |
LL | fn main() {}
| ^^ unexpected token
error: aborting due to 4 previous errors