Skip to content

Conversation

@fredszaq
Copy link

@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
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