aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-ast-lower-block.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/hir/rust-ast-lower-block.h')
-rw-r--r--gcc/rust/hir/rust-ast-lower-block.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-block.h b/gcc/rust/hir/rust-ast-lower-block.h
index be6ca64..a39c010 100644
--- a/gcc/rust/hir/rust-ast-lower-block.h
+++ b/gcc/rust/hir/rust-ast-lower-block.h
@@ -115,7 +115,7 @@ class ASTLoweringIfLetBlock : public ASTLoweringBase
using Rust::HIR::ASTLoweringBase::visit;
public:
- static HIR::IfLetExpr *translate (AST::IfLetExpr &expr)
+ static HIR::MatchExpr *translate (AST::IfLetExpr &expr)
{
ASTLoweringIfLetBlock resolver;
expr.accept_vis (resolver);
@@ -135,7 +135,10 @@ public:
private:
ASTLoweringIfLetBlock () : ASTLoweringBase (), translated (nullptr) {}
- HIR::IfLetExpr *translated;
+ void desugar_iflet (AST::IfLetExpr &, HIR::Expr **, HIR::Expr *,
+ std::vector<HIR::MatchCase> &);
+
+ HIR::MatchExpr *translated;
};
class ASTLoweringExprWithBlock : public ASTLoweringBase
@@ -149,9 +152,7 @@ public:
ASTLoweringExprWithBlock resolver;
expr.accept_vis (resolver);
if (resolver.translated != nullptr)
- {
- resolver.mappings.insert_hir_expr (resolver.translated);
- }
+ resolver.mappings.insert_hir_expr (resolver.translated);
*terminated = resolver.terminated;
return resolver.translated;