Skip to content

Commit 00b9dc0

Browse files
committed
remove-todo-diagnostic
1 parent e1fc972 commit 00b9dc0

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

toolchain/check/facet_type.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,15 @@ static auto WitnessQueryMatchesInterface(
5555
static auto IncompleteFacetTypeDiagnosticBuilder(
5656
Context& context, SemIR::LocId loc_id, SemIR::TypeInstId facet_type_inst_id,
5757
bool is_definition) -> DiagnosticBuilder {
58-
if (is_definition) {
59-
CARBON_DIAGNOSTIC(ImplAsIncompleteFacetTypeDefinition, Error,
60-
"definition of impl as incomplete facet type {0}",
61-
InstIdAsType);
62-
return context.emitter().Build(loc_id, ImplAsIncompleteFacetTypeDefinition,
63-
facet_type_inst_id);
64-
} else {
65-
context.TODO(loc_id,
66-
"declaration of impl as incomplete interface with a rewrite "
67-
"constraint");
68-
return context.emitter().BuildSuppressed();
69-
}
58+
// TODO: Remove this parameter. Facet types don't need to be complete for in
59+
// declarations, unless there's a rewrite into `.Self`. But that completeness
60+
// is checked/required by the member access of the rewrite.
61+
CARBON_CHECK(is_definition);
62+
CARBON_DIAGNOSTIC(ImplAsIncompleteFacetTypeDefinition, Error,
63+
"definition of impl as incomplete facet type {0}",
64+
InstIdAsType);
65+
return context.emitter().Build(loc_id, ImplAsIncompleteFacetTypeDefinition,
66+
facet_type_inst_id);
7067
}
7168

7269
auto GetImplWitnessAccessWithoutSubstitution(Context& context,

0 commit comments

Comments
 (0)