Two-way vs. one-way unification when resolving traits
I'm trying to understand how trait resolving in the code below works: enum Wrap<T> { W, WithVal(T), } struct Alt; trait Two<B> {} impl<T> Two<T> for Wrap<T> {} fn f<P, Q>(p: P, q: Q) where P: Two<Q> {} fn main() {…