Skip to content

Parse outer attributes on StructPatternEtCetera #8610

@Veykril

Description

@Veykril

We do not currently parse the following snippet:

struct Foo { x: u32 }

let Foo { #[cfg(any())] .. };

This requires a change in the ungrammar file here https://github.com/rust-analyzer/ungrammar/blob/222f4d2891459e37b358930a0e608fdf5eed6da0/rust.ungram#L611-L615 and then a parsing change here https://github.com/rust-analyzer/rust-analyzer/blob/70fe7a4515ebdc6222a6565cd4cd1c5fd0c77350/crates/parser/src/grammar/patterns.rs#L206

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserparser issuesE-has-instructionsIssue has some instructions and pointers to code to get startedS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions