-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-type-systemArea: Type systemArea: Type system
Description
Right now if you write a generic implementation on all types that implement Add, like so:
impl<T: Copy Add<T,T>> Option<T> : Add<Option<T>, Option<T>> {
...attempting to use the implementation on numeric types fails because they haven't technically implemented Add. There should probably be some compiler magic to ensure that numeric types satisfy such generic bounds, even if they don't technically implement the trait.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type system