add testcase for 127868

This commit is contained in:
yukang 2024-07-19 14:55:27 +08:00
parent 004e155c46
commit 9a5e41c56f
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// ignore-tidy-trailing-newlines
// issue: rust-lang/rust#127868
fn main() {
let a = [[[[[[[[[[[[[[[[[[[[1, {, (, [,;
} //~ ERROR mismatched closing delimiter: `}`
//~ ERROR this file contains an unclosed delimiter

View File

@ -0,0 +1,45 @@
error: mismatched closing delimiter: `}`
--> $DIR/mismatched-delimiter-corner-case-issue-127868.rs:5:42
|
LL | fn main() {
| - closing delimiter possibly meant for this
LL | let a = [[[[[[[[[[[[[[[[[[[[1, {, (, [,;
| ^ unclosed delimiter
LL | }
| ^ mismatched closing delimiter
error: this file contains an unclosed delimiter
--> $DIR/mismatched-delimiter-corner-case-issue-127868.rs:7:51
|
LL | fn main() {
| - unclosed delimiter
LL | let a = [[[[[[[[[[[[[[[[[[[[1, {, (, [,;
| -------------------- - this delimiter might not be properly closed...
| ||||||||||||||||||||
| |||||||||||||||||||unclosed delimiter
| ||||||||||||||||||unclosed delimiter
| |||||||||||||||||unclosed delimiter
| ||||||||||||||||unclosed delimiter
| |||||||||||||||unclosed delimiter
| ||||||||||||||unclosed delimiter
| |||||||||||||unclosed delimiter
| ||||||||||||unclosed delimiter
| |||||||||||unclosed delimiter
| ||||||||||unclosed delimiter
| |||||||||unclosed delimiter
| ||||||||unclosed delimiter
| |||||||unclosed delimiter
| ||||||unclosed delimiter
| |||||unclosed delimiter
| ||||unclosed delimiter
| |||unclosed delimiter
| ||unclosed delimiter
| |unclosed delimiter
| unclosed delimiter
LL | }
| - ...as it matches this but it has different indentation
LL |
| ^
error: aborting due to 2 previous errors