Skip to content

Conversation

@LilyFirefly
Copy link
Contributor

Fixes #4723.

@LilyFirefly LilyFirefly added bugfix rust Pull requests that update Rust code labels Nov 21, 2024
@LilyFirefly LilyFirefly requested a review from Icxolu November 21, 2024 22:12
@LilyFirefly LilyFirefly self-assigned this Nov 21, 2024
Copy link
Contributor

@alex alex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible

Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! So many edge cases to look out for 😅

@LilyFirefly LilyFirefly force-pushed the fix-ambiguous-associated-item-error branch 2 times, most recently from a858c2e to d7d5b54 Compare November 22, 2024 08:01
@davidhewitt davidhewitt mentioned this pull request Nov 22, 2024
The `#[pyclass]` macro implements `IntoPyObject` for the annotated enum.
When the enum has any of `Error`, `Output` or `Target` as members, this
clashes with the associated types of `IntoPyObject`.

This also happens when deriving `IntoPyObject` directly.
@LilyFirefly LilyFirefly force-pushed the fix-ambiguous-associated-item-error branch from d7d5b54 to 5335b28 Compare November 23, 2024 18:19
This uses the fix described in rust-lang/rust#57644

Also apply fix to `#[derive(IntoPyObject)]`.
@LilyFirefly LilyFirefly force-pushed the fix-ambiguous-associated-item-error branch from 5335b28 to f82ca32 Compare November 23, 2024 19:41
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think this seems complete to me too 👍

@davidhewitt davidhewitt added this pull request to the merge queue Nov 23, 2024
Merged via the queue into main with commit 9681b54 Nov 23, 2024
45 checks passed
@davidhewitt davidhewitt deleted the fix-ambiguous-associated-item-error branch November 23, 2024 22:50
davidhewitt pushed a commit that referenced this pull request Nov 25, 2024
* Add test for ambiguous associated item

The `#[pyclass]` macro implements `IntoPyObject` for the annotated enum.
When the enum has any of `Error`, `Output` or `Target` as members, this
clashes with the associated types of `IntoPyObject`.

This also happens when deriving `IntoPyObject` directly.

* Fix #4723: ambiguous associated item in #[pyclass]

This uses the fix described in rust-lang/rust#57644

Also apply fix to `#[derive(IntoPyObject)]`.
davidhewitt pushed a commit that referenced this pull request Nov 25, 2024
* Add test for ambiguous associated item

The `#[pyclass]` macro implements `IntoPyObject` for the annotated enum.
When the enum has any of `Error`, `Output` or `Target` as members, this
clashes with the associated types of `IntoPyObject`.

This also happens when deriving `IntoPyObject` directly.

* Fix #4723: ambiguous associated item in #[pyclass]

This uses the fix described in rust-lang/rust#57644

Also apply fix to `#[derive(IntoPyObject)]`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ambiguous associated item 'Error' since 0.23

5 participants