Skip to content

Conversation

@Polygonalr
Copy link
Contributor

Fixes #4163.

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-expr.cc (visit(StructExprStruct)): Update to properly
	unwrap enum variants for type checking.
	* typecheck/rust-tyty.cc (VariantDef::get_fields) : Remove NUM assert.
	* backend/rust-compile-expr.cc: Update to properly unwrap enum variants for type
	resolution checking.

Signed-off-by: Yap Zhi Heng <[email protected]>
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

This looks really good to me - I'll let @philberty review it as he knows the code more :) Thank you that's great work!!

Copy link
Member

@philberty philberty left a comment

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 Jan 7, 2026
Merged via the queue into Rust-GCC:master with commit 32622b7 Jan 7, 2026
12 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in libcore 1.49 Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ICE in get_fields, at rust/typecheck/rust-tyty.cc:1569

3 participants