mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
feat: allow attributes on all expressions
Attrs are syntactically valid on any expression, even if they are not allowed semantically everywhere yet.
This commit is contained in:
parent
7dc331faef
commit
56964c9bd3
20 changed files with 303 additions and 335 deletions
|
@ -41,7 +41,7 @@ pub(super) fn meta(p: &mut Parser) {
|
|||
match p.current() {
|
||||
T![=] => {
|
||||
p.bump(T![=]);
|
||||
if expressions::expr(p).0.is_none() {
|
||||
if !expressions::expr(p) {
|
||||
p.error("expected expression");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue