So I was writing an article on metaprogramming and noticed the compiler isn't able to properly infer transformed types when the transformation contains a lifetime. I've reduced the example to 50 loc: lifetime.rs · GitHub
Basically I'm trying to write a mapping trait that turns a tuple representing a list of types into another tuple containing a list of mapping results.
lifetime.rs version in the linked gist fails to compile while the
discrete_type.rs version works just fine. I'm wondering whether this is a compiler bug I should report or I'm missing something about lifetimes.
Both versions are identical except in
ToHandler<'s> takes a lifetime (and does nothing with it), and in
ToHandler<T> takes a type (and uses it).