Skip to content

Add Clone and Copy derives#533

Open
fredszaq wants to merge 9 commits intoJelteF:masterfrom
fredszaq:clone_and_copy_derive
Open

Add Clone and Copy derives#533
fredszaq wants to merge 9 commits intoJelteF:masterfrom
fredszaq:clone_and_copy_derive

Conversation

@fredszaq
Copy link
Copy Markdown

@fredszaq fredszaq commented Jan 9, 2026

Resolves #439

Synopsis

This adds 2 new derives for Clone and Copy. Those won't put any additionnal contraints on generic types by default, but provide #[clone(bound(...))] and #[copy(bound(...))] attributes if you need a fine tune the bounds

Solution

I moved the Bounds attribute from the fmt module to utils and reused it for both Derives

Checklist

  • Documentation is updated (if required)
  • Tests are added/updated (if required)
  • CHANGELOG entry is added (if required)

@fredszaq fredszaq changed the title Clone and copy derive Add Clone and Copy derives Jan 9, 2026
@tyranron tyranron assigned tyranron and fredszaq and unassigned tyranron Jan 9, 2026
@tyranron tyranron added enhancement k::api Related to API (application interface) labels Jan 9, 2026
@tyranron tyranron added this to the next milestone Jan 9, 2026
@fredszaq fredszaq mentioned this pull request Jan 9, 2026
3 tasks
@fredszaq
Copy link
Copy Markdown
Author

merged master into this to address the conflict in cargo.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement k::api Related to API (application interface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for deriving Clone/Copy and other standard traits without generic type parameter transitiveness

2 participants