Lifetime doesn't survive type mapping

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: · 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.

The version in the linked gist fails to compile while the 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).

The terms/jargon applicable here is the the compiler fails to normalize the trait projection (associated type in a particular trait implementation) when there's a lifetime involved in some particular way.

There's a number of normalization issues in the repo (and it's a pain to search on mobile); perhaps it's this one (or perhaps there's a more relevant one):


I further reduced the example further and added it to an issue I found matches my example best.

Thanks for informing me on appropriate terms to use to describe my problem, that helped a lot with tracking the issue down.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.