File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,15 @@ static auto WitnessQueryMatchesInterface(
5555static 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
7269auto GetImplWitnessAccessWithoutSubstitution (Context& context,
You can’t perform that action at this time.
0 commit comments