Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse and lower let-else statements #3468

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

CohenArthur
Copy link
Member

Fixes #3459
Fixes #3460

gcc/rust/ChangeLog:

	* ast/rust-stmt.h (class LetStmt): Add optional expression for diverging else.
	* ast/rust-ast-builder.cc (Builder::let): Use new API.
gcc/rust/ChangeLog:

	* parse/rust-parse-impl.h (Parser::parse_let_stmt): Add new parsing in case of `else` token.
gcc/rust/ChangeLog:

	* ast/rust-ast-collector.cc (TokenCollector::visit): Add handling for diverging else
	expression.
gcc/rust/ChangeLog:

	* resolve/rust-ast-resolve-stmt.h: Add handling for diverging else.
	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
gcc/rust/ChangeLog:

	* hir/tree/rust-hir-stmt.h (class LetStmt): Add optional diverging else expression.
	* hir/tree/rust-hir-stmt.cc: Likewise.
	* hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Add handling for lowering
	diverging else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lower let-else statements properly Parse let-else statements
1 participant