Add storage for <type> impls <facettype> in the FacetTypeInfo (#7005)

We don't yet actually add any in check, but this adds the storage for
them, and capabilities to import them, evaluate them, substitute into
them with specifics, name them, format them, and stringify them.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Dana Jansens
2026-04-03 00:19:57 +00:00
committed by GitHub
co-authored by Chandler Carruth
parent 912825feaf
commit 451b50a3ad
10 changed files with 392 additions and 57 deletions
+18 -1
View File
@@ -744,7 +744,24 @@ class Stringifier {
step_stack_->PushString(" .Self impls ");
some_where = true;
}
// TODO: Other restrictions from facet_type_info.
for (const auto& type_impls :
llvm::reverse(facet_type_info.type_impls_interfaces)) {
if (some_where) {
step_stack_->PushString(" and");
}
step_stack_->Push(type_impls.self_type, " impls ",
type_impls.specific_interface);
some_where = true;
}
for (const auto& type_impls :
llvm::reverse(facet_type_info.type_impls_named_constraints)) {
if (some_where) {
step_stack_->PushString(" and");
}
step_stack_->Push(type_impls.self_type, " impls ",
type_impls.specific_named_constraint);
some_where = true;
}
if (some_where) {
step_stack_->PushString(" where");
}