aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
authorRyan Cumming <[email protected]>2019-06-30 08:59:26 +0100
committerRyan Cumming <[email protected]>2019-06-30 09:36:54 +0100
commitb01496538c938d6a0c904512a38e4325cc960334 (patch)
treea6588dc1af1094aadac540bfe90acced3fb08fea /crates/ra_hir/src/code_model.rs
parent27df89f47d5f0a6e8e62d517d98dda854efabc34 (diff)
Support attributes on array members
Array members are allow to have attributes such as `#[cfg]`. This is a bit tricky as we don't know if the first expression is an initializer or a member until we encounter a `;`. This reuses a trick from `stmt` where we remember if we saw an attribute and then raise an error if the first expression ends up being an initializer. This isn't perfect as the error isn't correctly located on the attribute or initializer; it ends up immediately after the `;`.
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
0 files changed, 0 insertions, 0 deletions