mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Parse outer atttributes for RecordPatField
This commit is contained in:
parent
70fe7a4515
commit
3f7a086b4f
3 changed files with 57 additions and 8 deletions
|
@ -206,13 +206,15 @@ fn record_pat_field_list(p: &mut Parser) {
|
|||
T![.] if p.at(T![..]) => p.bump(T![..]),
|
||||
T!['{'] => error_block(p, "expected ident"),
|
||||
|
||||
c => {
|
||||
_ => {
|
||||
let m = p.start();
|
||||
match c {
|
||||
attributes::outer_attrs(p);
|
||||
match p.current() {
|
||||
// test record_pat_field
|
||||
// fn foo() {
|
||||
// let S { 0: 1 } = ();
|
||||
// let S { x: 1 } = ();
|
||||
// let S { #[cfg(any())] x: 1 } = ();
|
||||
// }
|
||||
IDENT | INT_NUMBER if p.nth(1) == T![:] => {
|
||||
name_ref_or_index(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue