#feature on safety
template<typename T>
void call/(where T:static)(T);
int main() {
void(*pf)(int) = addr call<int>;
}
This fails to convert. The problem is that lifetime normalization isn't stripping the unused T:static outlives-constraint, which means the /static lifetime parameter stays a part of the lifetime descriptor, and the rhs of the assignment doesn't have the same type as the lhs of the assignment. Currently template substitution of outlives-constraints is performed during lifetime canonicalization--but that's too late! It has to be moved up.
This fails to convert. The problem is that lifetime normalization isn't stripping the unused T:static outlives-constraint, which means the /static lifetime parameter stays a part of the lifetime descriptor, and the rhs of the assignment doesn't have the same type as the lhs of the assignment. Currently template substitution of outlives-constraints is performed during lifetime canonicalization--but that's too late! It has to be moved up.