fix: Parse outer attributes on StructPatternEtCetera#10420
Merged
Conversation
matklad
reviewed
Oct 2, 2021
| T!['{'] => error_block(p, "expected ident"), | ||
| T![#] => { | ||
| let m = p.start(); | ||
| attributes::outer_attrs(p); |
Contributor
There was a problem hiding this comment.
Hm, seems like we can move this outer_attrs call to before the match? like we do in record_expr_field_list
Contributor
Author
There was a problem hiding this comment.
Yes, the code will be cleaner.
bors Bot
added a commit
to rust-analyzer/ungrammar
that referenced
this pull request
Oct 3, 2021
41: add Attr to RestPat r=XFFXFF a=XFFXFF Try to fix rust-lang/rust-analyzer#8610 Related pr in rust-analyzer: rust-lang/rust-analyzer#10420 Co-authored-by: zhoufan <1247714429@qq.com>
Contributor
|
bors r+ |
Contributor
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Nov 11, 2025
41: add Attr to RestPat r=XFFXFF a=XFFXFF Try to fix rust-lang/rust-analyzer#8610 Related pr in rust-analyzer: rust-lang/rust-analyzer#10420 Co-authored-by: zhoufan <1247714429@qq.com>
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Nov 15, 2025
41: add Attr to RestPat r=XFFXFF a=XFFXFF Try to fix rust-lang#8610 Related pr in rust-analyzer: rust-lang#10420 Co-authored-by: zhoufan <1247714429@qq.com>
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Nov 15, 2025
41: add Attr to RestPat r=XFFXFF a=XFFXFF Try to fix rust-lang/rust-analyzer#8610 Related pr in rust-analyzer: rust-lang/rust-analyzer#10420 Co-authored-by: zhoufan <1247714429@qq.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Try to fix #8610
Related pr in ungrammer: rust-analyzer/ungrammar#41