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

Fix bad type checking on fn trait calls #3240

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

philberty
Copy link
Member

Fixes #2953

We can have a case where the placeholder is not configred and the
can_resolve check is not detecting this case which can lead to ICE.

gcc/rust/ChangeLog:

	* typecheck/rust-tyty.cc (PlaceholderType::can_resolve): check for empty mappings

Signed-off-by: Philip Herron <[email protected]>
Fixes RustGcc#2953

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): fix the ty_id

gcc/testsuite/ChangeLog:

	* rust/compile/nr2/exclude: nr2 cant handle these
	* rust/compile/issue-2953-1.rs: New test.
	* rust/compile/issue-2953-2.rs: New test.

Signed-off-by: Philip Herron <[email protected]>
@philberty philberty added this to the Remaining typecheck issues milestone Nov 5, 2024
@philberty philberty enabled auto-merge November 5, 2024 18:25
@philberty philberty added this pull request to the merge queue Nov 5, 2024
Merged via the queue into master with commit e82d79c Nov 5, 2024
12 checks passed
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 on FnOnce
1 participant