A trait implemented for all
X<'a> types that can be safely and
efficiently converted to
X<'tcx> as long as they are part of the
This can be done, for example, for
by looking them up in their respective interners.
However, this is still not the best implementation as it does
need to compare the components, even for interned values.
It would be more efficient if
TypedArena provided a way to
determine whether the address is in the allocated range.
None is returned if the value or one of the components is not part
of the provided context.
None can be returned if either the type interner doesn’t
TyKind key or if the address of the interned
pointer differs. The latter case is possible if a primitive type,
u8, was interned in a different context.