Skip to content

Unify AST::IfLetExprConseqIf{,Let} into AST::IfLetExprConseqElse#2002

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
powerboat9:ast-if-let
Apr 14, 2023
Merged

Unify AST::IfLetExprConseqIf{,Let} into AST::IfLetExprConseqElse#2002
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
powerboat9:ast-if-let

Conversation

@powerboat9

Copy link
Copy Markdown
Collaborator

More code cleanup related to if let lowering.

@powerboat9 powerboat9 force-pushed the ast-if-let branch 4 times, most recently from 709b95c to b179a60 Compare March 20, 2023 12:34
@philberty philberty requested review from CohenArthur and philberty and removed request for CohenArthur March 20, 2023 21:08
@CohenArthur CohenArthur self-assigned this Mar 28, 2023
@CohenArthur

Copy link
Copy Markdown
Member

Once conflicts are resolved I'm in favor of merging this

@powerboat9 powerboat9 force-pushed the ast-if-let branch 4 times, most recently from d537e90 to 97cf3ee Compare March 31, 2023 18:20
@powerboat9

Copy link
Copy Markdown
Collaborator Author

@CohenArthur

@powerboat9 powerboat9 mentioned this pull request Apr 8, 2023
@powerboat9 powerboat9 force-pushed the ast-if-let branch 2 times, most recently from 776362b to 95607ec Compare April 12, 2023 12:35
This simplifies the AST's representation of if-let-statements
to match the HIR.

gcc/rust/ChangeLog:

	* ast/rust-expr.h
	(class IfLetExprConseqElse): Make else_block ExprWithBlock.
	(class IfLetExprConseqIf): Remove.
	(class IfLetExprConseqIfLet): Remove.
	* ast/rust-ast-full-decls.h
	(class IfLetExprConseqIf): Remove.
	(class IfLetExprConseqIfLet): Remove.
	* ast/rust-ast.cc
	(IfLetExprConseqElse::as_string): Adjust output.
	(IfLetExprConseqIf::as_string): Remove.
	(IfLetExprConseqIfLet::as_string): Remove.
	(IfLetExprConseqIf::accept_vis): Remove.
	(IfLetExprConseqIfLet::accept_vis): Remove.
	* ast/rust-ast-visitor.h
	(ASTVisitor::visit): Remove IfLetExprConseqIf{,Let} visitors.
	* ast/rust-ast-dump.cc
	(Dump::visit): Likewise.
	* ast/rust-ast-dump.h:
	(Dump::visit): Likewise.
	* ast/rust-ast-tokenstream.cc
	(TokenStream::visit): Likewise.
	* ast/rust-ast-tokenstream.h
	(TokenStream::visit): Likewise.
	* util/rust-attributes.cc
	(AttributeChecker::visit): Likewise.
	* util/rust-attributes.h:
	(AttributeChecker::visit): Likewise.
	* resolve/rust-early-name-resolver.cc
	(EarlyNameResolver::visit): Likewise.
	* resolve/rust-early-name-resolver.h
	(EarlyNameResolver::visit): Likewise.
	* resolve/rust-ast-resolve-base.h
	(ResolverBase::visit): Likewise.
	* resolve/rust-ast-resolve-base.cc
	(ResolverBase::visit): Likewise.
	* checks/errors/rust-feature-gate.h
	(FeatureGate::visit): Likewise.
	* expand/rust-cfg-strip.cc
	(CfgStrip::visit): Likewise.
	* expand/rust-cfg-strip.h:
	(CfgStrip::visit): Likewise.
	* expand/rust-expand-visitor.cc
	(ExpandVisitor::visit): Likewise.
	* expand/rust-expand-visitor.h
	(ExpandVisitor::visit): Likewise.
	* hir/rust-ast-lower-base.cc
	(ASTLoweringBase::visit): Likewise.
	* hir/rust-ast-lower-base.h:
	(ASTLoweringBase::visit): Likewise.
	* parse/rust-parse-impl.h
	(Parser::parse_if_let_expr): Replace IfLetExprConseqIf{,Let} with IfLetExprConseqElse.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
@CohenArthur CohenArthur added this pull request to the merge queue Apr 14, 2023
@CohenArthur CohenArthur marked this pull request as draft April 14, 2023 12:36
Merged via the queue into Rust-GCC:master with commit 2608859 Apr 14, 2023
@powerboat9 powerboat9 deleted the ast-if-let branch April 14, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants