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

gccrs: Fix ICE by adding check for enum candidate's #2490

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Conversation

philberty
Copy link
Member

Fixes #2479

…ution

Fixes #2479

gcc/rust/ChangeLog:

	* typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item):
	always resolve the type even when its an a mandatory trait item
	* typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
	Add check for enum candidates otherwise you get undefined behaviour

gcc/testsuite/ChangeLog:

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

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@philberty philberty enabled auto-merge July 30, 2023 18:19
@philberty philberty added this pull request to the merge queue Jul 30, 2023
Merged via the queue into master with commit 22f4c74 Jul 30, 2023
@philberty philberty deleted the phil/ice-type branch July 31, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ICE - Expected Type got something else
1 participant