]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Unify HIR::IfLetExprConseqIf{,Let} into HIR::IfLetExprConseqElse
authorOwen Avery <powerboat9.gamer@gmail.com>
Wed, 15 Mar 2023 20:44:07 +0000 (16:44 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:21:12 +0000 (18:21 +0100)
commit4622e12040e585cf48f4a2d04e820b8d3506c983
tree275bd813d1c2276eec9641220006fb9ee564a317
parent265d8555fe3ad38755e64a6b9880521c7f3a3cc7
gccrs: Unify HIR::IfLetExprConseqIf{,Let} into HIR::IfLetExprConseqElse

This should allow for 'if let' expressions to be lowered more easily.

gcc/rust/ChangeLog:

* backend/rust-compile-block.h
(CompileConditionalBlocks::visit): Remove IfLetExprConseqIf{,Let} visitors.
(CompileExprWithBlock::visit): Remove IfLetExprConseqIf{,Let} visitors.
* backend/rust-compile-expr.h
(CompileExpr::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/rust-unsafe-checker.cc
(UnsafeChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/rust-unsafe-checker.h
(UnsafeChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/rust-const-checker.cc
(ConstChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/rust-const-checker.h
(ConstChecker::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/privacy/rust-privacy-reporter.cc
(PrivacyReporter::visit): Remove IfLetExprConseqIf{,Let} visitors.
* checks/errors/privacy/rust-privacy-reporter.h
(PrivacyReporter::visit): Remove IfLetExprConseqIf{,Let} visitors.
* hir/tree/rust-hir-expr.h
(class IfLetExprConseqElse): Make else_block ExprWithBlock.
(class IfLetExprConseqIf): Remove.
(class IfLetExprConseqIfLet): Remove.
* hir/tree/rust-hir-full-decls.h
(class IfLetExprConseqIf): Remove.
(class IfLetExprConseqIfLet): Remove.
* hir/tree/rust-hir.cc
(IfLetExprConseqElse::as_string): Adjust output.
(IfLetExprConseqIf::as_string): Remove.
(IfLetExprConseqIfLet::as_string): Remove.
(IfLetExprConseqIf::accept_vis): Remove.
(IfLetExprConseqIfLet::accept_vis): Remove.
* hir/tree/rust-hir-visitor.h
(HIRFullVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
(HIRFullVisitorBase::visit): Remove IfLetExprConseqIf{,Let} visitors.
(HIRExpressionVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
* hir/rust-hir-dump.cc
(Dump::visit): Remove IfLetExprConseqIf{,Let} visitors.
* hir/rust-hir-dump.h
(Dump::visit): Remove IfLetExprConseqIf{,Let} visitors.
* typecheck/rust-hir-type-check-expr.h
(TypeCheckExpr::visit): Remove IfLetExprConseqIf{,Let} visitors.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
15 files changed:
gcc/rust/backend/rust-compile-block.h
gcc/rust/backend/rust-compile-expr.h
gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
gcc/rust/checks/errors/rust-const-checker.cc
gcc/rust/checks/errors/rust-const-checker.h
gcc/rust/checks/errors/rust-unsafe-checker.cc
gcc/rust/checks/errors/rust-unsafe-checker.h
gcc/rust/hir/rust-hir-dump.cc
gcc/rust/hir/rust-hir-dump.h
gcc/rust/hir/tree/rust-hir-expr.h
gcc/rust/hir/tree/rust-hir-full-decls.h
gcc/rust/hir/tree/rust-hir-visitor.h
gcc/rust/hir/tree/rust-hir.cc
gcc/rust/typecheck/rust-hir-type-check-expr.h