Suppose I have code like:
impl<A> Stream for MyStruct<A>
where
A: MyTrait
{
// ...
}
But if a certain feature flag is enabled, then A also needs to be Send + Sync, so I need A: MyTrait + Send + Sync if that feature is enabled. Is there a way to do this without having to duplicate the implementation? It appears I can't use #[cfg(feature = "...")] in a where clause.