mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Allow attributes on expressions
https://github.com/rust-lang/rust/pull/69201/
This commit is contained in:
parent
52a220cece
commit
d739731830
@ -50,10 +50,8 @@ fn expr_no_struct(p: &mut Parser) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
|
fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
|
||||||
match kind {
|
let forbid = matches!(kind, BIN_EXPR | RANGE_EXPR);
|
||||||
BIN_EXPR | RANGE_EXPR | IF_EXPR => false,
|
!forbid
|
||||||
_ => true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
|
pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user