How to make a trait implementation for the type specified by the template?
use std::ops::{Add};
trait Vector<T> {}
impl<V, T> Add for V where V: Vector<T> {}
Errors:
Compiling playground v0.0.1 (/playground)
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> src/lib.rs:5:9
|
5 | impl<V, T> Add for V where V: Vector<T> {}
| ^ unconstrained type parameter
error: aborting due to previous error
For more information about this error, try `rustc --explain E0207`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.