aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/expressions/atom.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-02 20:20:24 +0100
committerGitHub <[email protected]>2019-09-02 20:20:24 +0100
commit7faec1c30046769d4ae490e15cf5405bcfbdeef8 (patch)
tree6d268b721027a5350928a6c5a0ec227b5fde8ebc /crates/ra_parser/src/grammar/expressions/atom.rs
parenta8397deab914240aca8f015fb3736689919c0a5b (diff)
parente94587e3153b52684fd3f6b82c8e7efc09ff5c8d (diff)
Merge #1752
1752: Always wrap blocks into block expressions r=flodiebold a=matklad This way, things like function bodies are expressions, and we don't have to single them out Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions/atom.rs')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index bc942ae01..ec7f2441d 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -463,10 +463,10 @@ fn match_guard(p: &mut Parser) -> CompletedMarker {
463// unsafe {}; 463// unsafe {};
464// 'label: {}; 464// 'label: {};
465// } 465// }
466fn block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker { 466pub(super) fn block_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
467 assert!(p.at(T!['{'])); 467 assert!(p.at(T!['{']));
468 let m = m.unwrap_or_else(|| p.start()); 468 let m = m.unwrap_or_else(|| p.start());
469 block(p); 469 naked_block(p);
470 m.complete(p, BLOCK_EXPR) 470 m.complete(p, BLOCK_EXPR)
471} 471}
472 472