'Nested generic impl
I don't understand why rust don't allow to use a generic inside an other generic constraint.
It's difficult to explain with normal words but for example this simple code don't work
trait GenericTraitA<T1> {}
trait GenericTraitB<T2> {}
impl<T1, T2: GenericTraitA<T1>> dyn GenericTraitB<T2> {}
It says that:
the type parameter
T1is not constrained by the impl trait, self type, or predicates
But i don't see why this is not constrained, i don't understand the ambiguity inside this code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
