mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Parse attr in rhs of let stmts
This commit is contained in:
parent
e0c6e106d9
commit
f4e48ad3e4
3 changed files with 37 additions and 8 deletions
|
@ -169,6 +169,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
|
|||
// let d: i32 = 92;
|
||||
// let e: !;
|
||||
// let _: ! = {};
|
||||
// let f = #[attr]||{};
|
||||
// }
|
||||
fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) {
|
||||
assert!(p.at(T![let]));
|
||||
|
@ -178,7 +179,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
|
|||
types::ascription(p);
|
||||
}
|
||||
if p.eat(T![=]) {
|
||||
expressions::expr(p);
|
||||
expressions::expr_with_attrs(p);
|
||||
}
|
||||
|
||||
match with_semi {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue