Add regression test for #81827

This commit is contained in:
Yuki Okushi 2022-05-21 01:32:02 +09:00
parent 22ee39504a
commit eab9240627
No known key found for this signature in database
GPG Key ID: 379CEEFDD63E5DD7
2 changed files with 46 additions and 0 deletions

View File

@ -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

View File

@ -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