diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-04-03 14:40:15 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-04-07 08:18:19 +0000 |
commit | 416e4b8449175e1862807f37d8c2bda554942ec8 (patch) | |
tree | 7da35097c69a676d3d8a6a3f36e15bf3b6e45117 /gcc/rust/hir | |
parent | 5ab8589e09ccaf7d36c9331425fba9413f40b26b (diff) | |
download | gcc-416e4b8449175e1862807f37d8c2bda554942ec8.zip gcc-416e4b8449175e1862807f37d8c2bda554942ec8.tar.gz gcc-416e4b8449175e1862807f37d8c2bda554942ec8.tar.bz2 |
Rename label getter in ContinueExpr
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit):
Call unchecked getter.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit):
Likewise.
* ast/rust-ast.cc (ContinueExpr::as_string): Likewise.
* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
* ast/rust-expr.h: Add new getter for the optional and rename getter
to get_label_unchecked.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r-- | gcc/rust/hir/rust-ast-lower-expr.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-expr.cc b/gcc/rust/hir/rust-ast-lower-expr.cc index 7bb7320..2ee5591f 100644 --- a/gcc/rust/hir/rust-ast-lower-expr.cc +++ b/gcc/rust/hir/rust-ast-lower-expr.cc @@ -622,7 +622,7 @@ ASTLoweringExpr::visit (AST::ContinueExpr &expr) { tl::optional<HIR::Lifetime> break_label; if (expr.has_label ()) - break_label = lower_lifetime (expr.get_label ()); + break_label = lower_lifetime (expr.get_label_unchecked ()); auto crate_num = mappings.get_current_crate (); Analysis::NodeMapping mapping (crate_num, expr.get_node_id (), |