aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2023-06-08 19:29:44 +0100
committerPhilip Herron <philip.herron@embecosm.com>2023-06-20 08:10:23 +0000
commitcbca7bdde221f68da59cd6d624cd34bf439b04b7 (patch)
treed3af8b272396b2ae209619362cf70306877cfa09 /gcc/rust/resolve
parent3a0f10e7984f8b2457201cfd8676e1351ac3b7a0 (diff)
downloadgcc-cbca7bdde221f68da59cd6d624cd34bf439b04b7.zip
gcc-cbca7bdde221f68da59cd6d624cd34bf439b04b7.tar.gz
gcc-cbca7bdde221f68da59cd6d624cd34bf439b04b7.tar.bz2
gccrs: Handle tail expression normalization right before lowering to HIR.
This allows braced macros at the end of blocks to correctly expand to zero or more statements followed by a tail expression. Parsing still creates a tail expression for now. gcc/rust/ChangeLog: * ast/rust-ast.cc (BlockExpr::strip_tail_expr): Don't normalize tail expression in this method. (BlockExpr::normalize_tail_expr): New method that only does the normalization. * ast/rust-expr.h: Declare new method. * hir/rust-ast-lower-block.h: Normalize tail expressions on blocks before lowering. Signed-off-by: Matthew Jasper <mjjasper1@gmail.com>
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions