Skip to content

Commit

Permalink
add testcase for 127868
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jul 19, 2024
1 parent 1a6e777 commit 521874a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 521874a

Please sign in to comment.