Skip to content

Commit 905c964

Browse files
authored
Remove two todos in facet_type.cpp (#5908)
The first TODO is done/under development. The second is no longer relevant now that we don't ever invalidate pointers into ValueStores.
1 parent 720c77f commit 905c964

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

toolchain/check/facet_type.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,12 @@ auto InitialFacetTypeImplWitness(
6363
SemIR::TypeInstId facet_type_inst_id, SemIR::TypeInstId self_type_inst_id,
6464
const SemIR::SpecificInterface& interface_to_witness,
6565
SemIR::SpecificId self_specific_id, bool is_definition) -> SemIR::InstId {
66-
// TODO: Finish facet type resolution. This code currently only handles
67-
// rewrite constraints that set associated constants to a concrete value.
68-
// Need logic to topologically sort rewrites to respect dependencies, and
69-
// afterwards reject duplicates that are not identical.
70-
7166
auto facet_type_id =
7267
context.types().GetTypeIdForTypeInstId(facet_type_inst_id);
7368
CARBON_CHECK(facet_type_id != SemIR::ErrorInst::TypeId);
7469
auto facet_type = context.types().GetAs<SemIR::FacetType>(facet_type_id);
75-
// TODO: This is currently a copy because I'm not sure whether anything could
76-
// cause the facet type store to resize before we are done with it.
77-
auto facet_type_info = context.facet_types().Get(facet_type.facet_type_id);
70+
const auto& facet_type_info =
71+
context.facet_types().Get(facet_type.facet_type_id);
7872

7973
if (!is_definition && facet_type_info.rewrite_constraints.empty()) {
8074
auto witness_table_inst_id = AddInst<SemIR::ImplWitnessTable>(

0 commit comments

Comments
 (0)