Skip to content

gccrs: Fix HIR::ClosureExpr copying - #4886

Merged
philberty merged 1 commit into
Rust-GCC:masterfrom
powerboat9:fix-closure-loc
Sep 11, 2026
Merged

gccrs: Fix HIR::ClosureExpr copying#4886
philberty merged 1 commit into
Rust-GCC:masterfrom
powerboat9:fix-closure-loc

Conversation

@powerboat9

Copy link
Copy Markdown
Collaborator

Fixes #4740

gcc/rust/ChangeLog:

	* hir/tree/rust-hir-expr.cc
	(ClosureParam::ClosureParam): Set locus.
	(ClosureParam::operator=): Likewise.
	(ClosureExpr::ClosureExpr): Likewise.
	(ClosureExpr::operator=): Likewise.
	* typecheck/rust-hir-type-check-expr.cc
	(TypeCheckExpr::visit (ClosureExpr)): Use
	Mappings::get_lang_item.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4740.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>

@philberty philberty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philberty
philberty added this pull request to the merge queue Sep 11, 2026
Merged via the queue into Rust-GCC:master with commit add37b3 Sep 11, 2026
13 checks passed
@powerboat9
powerboat9 deleted the fix-closure-loc branch September 12, 2026 01:20
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.

ICE in linemap_ordinary_map_lookup, at libcpp/line-map.cc:1197

2 participants