Skip to content

Commit

Permalink
Add regression test for #81827
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed May 20, 2022
1 parent 22ee395 commit eab9240
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/parser/issue-81827.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// error-pattern: this file contains an unclosed delimiter
// error-pattern: mismatched closing delimiter: `]`
// error-pattern: expected one of `)` or `,`, found `{`

#![crate_name="0"]



fn main() {}

fn r()->i{0|{#[cfg(r(0{]0
35 changes: 35 additions & 0 deletions src/test/ui/parser/issue-81827.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
error: this file contains an unclosed delimiter
--> $DIR/issue-81827.rs:11:27
|
LL | fn r()->i{0|{#[cfg(r(0{]0
| - - ^
| | |
| | unclosed delimiter
| unclosed delimiter

error: this file contains an unclosed delimiter
--> $DIR/issue-81827.rs:11:27
|
LL | fn r()->i{0|{#[cfg(r(0{]0
| - - ^
| | |
| | unclosed delimiter
| unclosed delimiter

error: mismatched closing delimiter: `]`
--> $DIR/issue-81827.rs:11:23
|
LL | fn r()->i{0|{#[cfg(r(0{]0
| - ^^ mismatched closing delimiter
| | |
| | unclosed delimiter
| closing delimiter possibly meant for this

error: expected one of `)` or `,`, found `{`
--> $DIR/issue-81827.rs:11:23
|
LL | fn r()->i{0|{#[cfg(r(0{]0
| ^ expected one of `)` or `,`

error: aborting due to 4 previous errors

0 comments on commit eab9240

Please sign in to comment.