fix clippy::clone_on_copy firing on #[pyclass(from_py_object)] + Copy classes - #6309
Merged
Merged
Conversation
alex
force-pushed
the
fix-clone-on-copy-from-py-object
branch
2 times, most recently
from
August 8, 2026 12:46
4f663c2 to
b983002
Compare
Member
Author
hmm, looks like there's some other CI issue? |
…`Copy` classes Move the clone out of the generated `FromPyObject` impl into a generic helper where the type is only known to be `Clone`, so the lint cannot trigger. Fixes PyO3#6308. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
alex
force-pushed
the
fix-clone-on-copy-from-py-object
branch
from
August 8, 2026 12:48
b983002 to
08d75b0
Compare
The generated `extract` body no longer references `FromPyObject` items inline, which changes how rustc renders the trait path in unrelated diagnostics in the same crate. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same trimmed-path diagnostic drift as the `inspect` revision; this snapshot only runs without `experimental-inspect` enabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 8, 2026
Member
Author
|
Failures don't look related. Are these known flakes or did somehting else break? |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 8, 2026
Member
Author
|
(Will have a PR up shortly fixing the MQ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the clone out of the generated
FromPyObjectimpl into a generic helper where the type is only known to beClone, so the lint cannot trigger. Fixes #6308.