derive `Copy` where possible by ShaharNaveh · Pull Request #6844 · RustPython/RustPython · GitHub
Skip to content

derive Copy where possible#6844

Merged
youknowone merged 3 commits intoRustPython:mainfrom
ShaharNaveh:codegen-blocks-copy
Jan 23, 2026
Merged

derive Copy where possible#6844
youknowone merged 3 commits intoRustPython:mainfrom
ShaharNaveh:codegen-blocks-copy

Conversation

@ShaharNaveh
Copy link
Copy Markdown
Contributor

@ShaharNaveh ShaharNaveh commented Jan 23, 2026

Summary by CodeRabbit

  • Chores

    • Made many lightweight/internal types trivially copyable to simplify value handling across the codebase.
    • Added a workspace lint to surface missing copy implementations as warnings.
    • Extended buffer support with explicit retain/release hooks.
  • Bug Fixes

    • Improved diagnostics and debug output for thread/lock acquisition scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@crates/common/src/lock/cell_lock.rs`:
- Around line 210-212: Fix the typo in the safety comment inside the
nonzero_thread_id function: change "Saftey: This is constant." to "Safety: This
is constant." near the NonZero::new_unchecked(1) call so the safety rationale is
spelled correctly for function nonzero_thread_id and the unsafe block using
NonZero::new_unchecked is properly documented.

Comment thread crates/common/src/lock/cell_lock.rs
@ShaharNaveh ShaharNaveh force-pushed the codegen-blocks-copy branch 2 times, most recently from ce752a9 to 000fff0 Compare January 23, 2026 13:50
@youknowone youknowone added this pull request to the merge queue Jan 23, 2026
Merged via the queue into RustPython:main with commit af7bbfa Jan 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants