diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-03-31 17:00:11 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-04-07 08:18:19 +0000 |
commit | be0d14806500f75266d2ad507cf7018de6a24766 (patch) | |
tree | 64437b5c665825566ee421aa2f2dae725911a374 /gcc/rust/ast/rust-ast-builder.cc | |
parent | 227a2b77d330a0e9fc32ba5d34a81598cb68c3ef (diff) | |
download | gcc-be0d14806500f75266d2ad507cf7018de6a24766.zip gcc-be0d14806500f75266d2ad507cf7018de6a24766.tar.gz gcc-be0d14806500f75266d2ad507cf7018de6a24766.tar.bz2 |
Resolve labels
gcc/rust/ChangeLog:
* hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Lower label only if
it exists.
* hir/tree/rust-hir-expr.cc (BlockExpr::BlockExpr): Make loop label
optional.
(BaseLoopExpr::BaseLoopExpr): Likewise.
(LoopExpr::LoopExpr): Likewise.
(WhileLoopExpr::WhileLoopExpr): Likewise.
* hir/tree/rust-hir-expr.h: Use optional for lifetime and labels.
* hir/tree/rust-hir.cc (WhileLoopExpr::as_string): Use getter.
(WhileLetLoopExpr::as_string): Likewise.
(LoopExpr::as_string): Likewise.
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Resolve labels.
* resolve/rust-late-name-resolver-2.0.h: Add visit function prototype
for loop labels.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast-builder.cc')
0 files changed, 0 insertions, 0 deletions