mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Fix macro expansion for statements w/o semicolon
This commit is contained in:
parent
c0a2b4e826
commit
8e07b23b84
10 changed files with 99 additions and 61 deletions
|
@ -63,11 +63,11 @@ pub(crate) mod fragments {
|
|||
}
|
||||
|
||||
pub(crate) fn stmt(p: &mut Parser) {
|
||||
expressions::stmt(p, expressions::StmtWithSemi::No)
|
||||
expressions::stmt(p, expressions::StmtWithSemi::No, true)
|
||||
}
|
||||
|
||||
pub(crate) fn stmt_optional_semi(p: &mut Parser) {
|
||||
expressions::stmt(p, expressions::StmtWithSemi::Optional)
|
||||
expressions::stmt(p, expressions::StmtWithSemi::Optional, false)
|
||||
}
|
||||
|
||||
pub(crate) fn opt_visibility(p: &mut Parser) {
|
||||
|
@ -133,7 +133,7 @@ pub(crate) mod fragments {
|
|||
continue;
|
||||
}
|
||||
|
||||
expressions::stmt(p, expressions::StmtWithSemi::Optional);
|
||||
expressions::stmt(p, expressions::StmtWithSemi::Optional, true);
|
||||
}
|
||||
|
||||
m.complete(p, MACRO_STMTS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue