Trait that automatically implies several From implementations?

If it's not much work to share? I'm happy to hear about it. Maybe it helps me to understand better what's exactly failing.

Even if I can work around these issues, I would like to know what is/was going on, and I'd like to provide feedback to the compiler developers. Though I also have to admit that once the type signatures get too complicated, it's difficult for me to understand what's happening. :hot_face:

Meanwhile I deal with four lifetimes in my code: 'a as a lifetime argument which helps me to accept closures that aren't static (but live as long as my virtual machine), 'b as a lifetime argument that indicates how long the virtual machine is living at least (which I need for internal references), 'c as a lifetime argument when I create temporary datums from borrowed values (to avoid extra memcpy), and 'd for HRTBs, hence I end up with stuff like:

for<'c, 'd> &'d <M as Machine<'a>>::Datum<'b, 'c>: TryInto<&'d str, Error = MachineError>

And this doesn't even cover the case yet, where MachineError is replaced by a generic type, as discussed in: Problem with HRTBs and associated type bounds.

So the overall complexity (in addition to the compiler errors I encountered) makes it difficult sometimes to maintain an overview…