I know this might sound weird, but we are in a situation in which we have a trait T with an associated type A with a lifetime, and A in turn is bound by a trait U that has an associated type B that is Copy, 'static, whatever, basically a number.
Our problem is that we need to extract B from Twithout having a lifetime around. So
trait T {
type A<'a>: U
where Self: 'a;
}
trait U {
type B: 'static + Clone + Copy + Send + Sync;
}
The real-life situation is that T is a factory of I/O things of type A, satisfying the trait U that have a lifetime as they depends on some memory held by T, like a Cursor, and B is its error type, which however has no connection with the lifetime—it's just an enum.
With for you can constrain B in a where clause, but we need the opposite—we need to retrieve B from T, in a situation in which there's no lifetime around.
It seems something reasonable to do—B is a static type that has nothing to do with 'a.
But can you do it?
Our current solution is to "copy" B into an associate type C of T. But when we have to write continuously where clauses with for specifying that B and C are the same.