With this preamble:
struct A;
struct B;
trait F<T> {}
this code does not compile:
fn f<T: F<A> + F<B>>() {}
but this does:
fn f<T>() where T : F<A> + F<B> {}
As an example of a case where this can't be worked around, consider associated types. This example does not seem to have any possible workaround:
trait G {
type X : F<A> + F<B>;
}
This attempt at a workaround causes an ICE:
trait G where Self::X : F<A> + F<B> {
type X;
}
and this example apparently isn't valid syntax:
trait G {
type X where X : F<A> + F<B>;
}
With this preamble:
this code does not compile:
but this does:
As an example of a case where this can't be worked around, consider associated types. This example does not seem to have any possible workaround:
This attempt at a workaround causes an ICE:
and this example apparently isn't valid syntax: