mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
always wrap block into an expression
This commit is contained in:
parent
a8397deab9
commit
3c2dea7f55
5 changed files with 19 additions and 14 deletions
|
@ -40,6 +40,11 @@ pub(crate) fn block(p: &mut Parser) {
|
|||
p.error("expected a block");
|
||||
return;
|
||||
}
|
||||
atom::block_expr(p, None);
|
||||
}
|
||||
|
||||
pub(crate) fn naked_block(p: &mut Parser) {
|
||||
assert!(p.at(T!['{']));
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
expr_block_contents(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue