Skip to content

Conversation

@philberty
Copy link
Member

When we were processing generic const param types on arrays the size type was overriding the const param decl because of a hirid reference mismatch

Fixes #3879

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): fix mappings

gcc/testsuite/ChangeLog:

* rust/compile/const_generics_18.rs: New test.
* rust/compile/const_generics_19.rs: New test.
* rust/execute/torture/const-generics-3.rs: New test.
* rust/execute/torture/const-generics-4.rs: New test.

When we were processing generic const param types on arrays the size type
was overriding the const param decl because of a hirid reference mismatch

Fixes #3879

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): fix mappings

gcc/testsuite/ChangeLog:

	* rust/compile/const_generics_18.rs: New test.
	* rust/compile/const_generics_19.rs: New test.
	* rust/execute/torture/const-generics-3.rs: New test.
	* rust/execute/torture/const-generics-4.rs: New test.

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

Invalid parse on array size expr inference

2 participants