derive_more icon indicating copy to clipboard operation
derive_more copied to clipboard

Seems Sum does not work for nested generic

Open misos1 opened this issue 1 year ago • 0 comments
trafficstars

#[derive(Add, Sum)]
struct A<T>
{
	i: T
}

#[derive(Add, Sum)]
struct B<T>
{
	a: A<T>
}
error[E0277]: cannot add `T` to `T`
  --> main.rs:7:15
   |
 7 | #[derive(Add, Sum)]
   |               ^^^ no implementation for `T + T`
   |

misos1 avatar May 18 '24 18:05 misos1