Skip to content

Conversation

philberty
Copy link
Member

This patch adds support to recursively walk fnptr types to do generic substitutions.

Fixes #4090

gcc/rust/ChangeLog:

* typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit): handle fnptr
* typecheck/rust-tyty.cc (FnPtr::handle_substitions): new
* typecheck/rust-tyty.h: likewise

gcc/testsuite/ChangeLog:

* rust/compile/issue-4090-1.rs: New test.
* rust/compile/issue-4090-2.rs: New test.

… substs

This patch adds support to recursively walk fnptr types to do generic
substitutions.

Fixes #4090

gcc/rust/ChangeLog:

	* typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit): handle fnptr
	* typecheck/rust-tyty.cc (FnPtr::handle_substitions): new
	* typecheck/rust-tyty.h: likewise

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4090-1.rs: New test.
	* rust/compile/issue-4090-2.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@philberty philberty added this to the Typecheck issues 16.1 milestone Sep 21, 2025
@philberty philberty added this pull request to the merge queue Sep 21, 2025
Merged via the queue into master with commit 6431cff Sep 21, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in libcore 1.49 Sep 21, 2025
@philberty philberty deleted the phil/fnptr-generics branch September 22, 2025 19:31
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.

FnPtr coercion incomplete
1 participant