error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
--> src/main.rs:5:23
|
5 | impl<V: Into<Vec<S>>, S: Into<String>> From<V> for Foo {
| ^ unconstrained type parameter
After reading E0207, it seems, this is not possible – is that correct?
If so: is there another way to archive this? I'm trying to avoid type parameters on Foo.
Basically, I'd like to be able to use Foo { x: ["bar"] }, etc.
then that duplication would result in implementing From<MyType> twice for Foo , which is not allowed.
Maybe I'm missing something, but why is this not possible? Vec, for example, has several From implementations, so why can't what I've tried result in a permutation of From implementations?