Skip to content

gccrs: Fix bad derive of Ord to use Self instead of raw type-name - #4880

Merged
philberty merged 1 commit into
masterfrom
phil/derive-issue
Sep 11, 2026
Merged

gccrs: Fix bad derive of Ord to use Self instead of raw type-name#4880
philberty merged 1 commit into
masterfrom
phil/derive-issue

Conversation

@philberty

Copy link
Copy Markdown
Member

The raw type name doesnt capture the generic state of the impl but Self does.

Fixes #4879

gcc/rust/ChangeLog:

* expand/rust-derive-ord.cc (DeriveOrd::cmp_fn): use Self

gcc/testsuite/ChangeLog:

* rust/compile/issue-4879.rs: New test.

The raw type name doesnt capture the generic state of the impl but Self
does.

Fixes #4879

gcc/rust/ChangeLog:

	* expand/rust-derive-ord.cc (DeriveOrd::cmp_fn): use Self

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4879.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@philberty philberty added the core Issue related to the compilation of the `core` crate label Sep 10, 2026
@philberty
philberty added this pull request to the merge queue Sep 11, 2026
Merged via the queue into master with commit c88ea29 Sep 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issue related to the compilation of the `core` crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bad derive ord impl

1 participant