Skip to content

gccrs: fix bad projection normalize - #4810

Merged
powerboat9 merged 1 commit into
masterfrom
phil/dev-2
Aug 23, 2026
Merged

powerboat9 merged 1 commit into
masterfrom
phil/dev-2

Conversation

@philberty

@philberty philberty commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

What can happen depending on order of operation is that the non trait position projections can resolve to generics where we can attempt to get the underlying type and base the projection on that.

Fixes #4804

gcc/rust/ChangeLog:

* typecheck/rust-type-util.cc (normalize_projection): add check

gcc/testsuite/ChangeLog:

* rust/execute/torture/issue-4808.rs: New test.

What can happen depending on order of operation is that the non trait
position projections can resolve to generics where we can attempt to get
the underlying type and base the projection on that.

Fixes #4804

gcc/rust/ChangeLog:

	* typecheck/rust-type-util.cc (normalize_projection): add check

gcc/testsuite/ChangeLog:

	* rust/execute/torture/issue-4804.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@powerboat9

Copy link
Copy Markdown
Collaborator

@philberty is that issue reference in the commit body right? I don't know if the github ui is screwing with me or not.

@powerboat9

powerboat9 commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator
commit 5303115a1d2065e3a896487abc0ed21c26550b77 (super/phil/dev-2)
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Sun Aug 23 13:57:57 2026 +0100

    gccrs: fix bad projection normalize
    
    What can happen depending on order of operation is that the non trait
    position projections can resolve to generics where we can attempt to get
    the underlying type and base the projection on that.
    
    Fixes Rust-GCC/gccrs#4804
    
    gcc/rust/ChangeLog:
    
            * typecheck/rust-type-util.cc (normalize_projection): add check
    
    gcc/testsuite/ChangeLog:
    
            * rust/execute/torture/issue-4804.rs: New test.
    
    Signed-off-by: Philip Herron <herron.philip@googlemail.com>


Thank you github ui.

@powerboat9
powerboat9 added this pull request to the merge queue Aug 23, 2026
@philberty

Copy link
Copy Markdown
Member Author

yeah it was to fix this #4804 where you fixed the lang item lookups

@powerboat9

Copy link
Copy Markdown
Collaborator

The github ui likes to visually replace Rust-GCC/gccrs#4804 with #4804, where upstream wants the former and not the latter.

Merged via the queue into master with commit 7e1296c Aug 23, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in libcore 1.49 Aug 23, 2026
@philberty
philberty deleted the phil/dev-2 branch August 30, 2026 18:55
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 in for-loop3 testcase

2 participants