-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #116889 - MU001999:master, r=petrochenkov
Eat close paren if capture_cfg to avoid unbalanced parens Fixes #116781
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#[derive(Debug)] | ||
struct Foo { | ||
#[cfg(all())] | ||
field: fn(($),), //~ ERROR expected pattern, found `$` | ||
//~^ ERROR expected pattern, found `$` | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
error: expected pattern, found `$` | ||
--> $DIR/issue-116781.rs:4:16 | ||
| | ||
LL | field: fn(($),), | ||
| ^ expected pattern | ||
|
||
error: expected pattern, found `$` | ||
--> $DIR/issue-116781.rs:4:16 | ||
| | ||
LL | field: fn(($),), | ||
| ^ expected pattern | ||
| | ||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | ||
|
||
error: aborting due to 2 previous errors | ||
|