Skip to content

Conversation

philberty
Copy link
Member

When we have generic paths like T::foobar during codegen sometimes we need to enforce an extra lookup for this generic parameter type to the mono morphized underlying type.

Fixes #3915
Fixes #1247

gcc/rust/ChangeLog:

* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): do another lookup

gcc/testsuite/ChangeLog:

* rust/compile/issue-3915.rs: New test.
* rust/execute/torture/sip-hasher.rs: New test.

@philberty philberty added this to the Typecheck issues 16.1 milestone Jul 20, 2025
@philberty philberty changed the title gccrs: fix bad monomophization of generic paths gccrs: fix bad monomophization of generic paths - GOAL TEST CASE SIP HASHER WORKS! Jul 20, 2025
When we have generic paths like T::foobar during codegen sometimes we need
to enforce an extra lookup for this generic parameter type to the mono
morphized underlying type.

Fixes #3915
Fixes #1247

gcc/rust/ChangeLog:

	* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): do another lookup

gcc/testsuite/ChangeLog:

	* rust/compile/issue-3915.rs: New test.
	* rust/execute/torture/sip-hasher.rs: New test.

Signed-off-by: Philip Herron <[email protected]>
@philberty philberty added this pull request to the merge queue Jul 20, 2025
Merged via the queue into master with commit 7d62c5d Jul 20, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in libcore 1.49 Jul 20, 2025
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.

Bad handling of path expression during monomoprhization libcore SIP hasher
1 participant