mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:11:12 +01:00
Rename singleton InstId constants to TypeInstId (#5323)
These constant instructions are all TypeInstId already in their type, and this makes their names match. Change the name of MakeSingletonInstId as well and update its comment.
This commit is contained in:
@@ -143,7 +143,7 @@ auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void {
|
||||
CARBON_CHECK(decl_id.has_value(), "Non-constant associated entity");
|
||||
if (auto decl =
|
||||
context.insts().TryGetAs<SemIR::AssociatedConstantDecl>(decl_id)) {
|
||||
if (witness_value == SemIR::ImplWitnessTablePlaceholder::InstId) {
|
||||
if (witness_value == SemIR::ImplWitnessTablePlaceholder::TypeInstId) {
|
||||
CARBON_DIAGNOSTIC(ImplAssociatedConstantNeedsValue, Error,
|
||||
"associated constant {0} not given a value in impl "
|
||||
"of interface {1}",
|
||||
@@ -251,7 +251,7 @@ auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void {
|
||||
auto witness_block =
|
||||
context.inst_blocks().GetMutable(witness_table.elements_id);
|
||||
for (auto& elem : witness_block) {
|
||||
if (elem == SemIR::ImplWitnessTablePlaceholder::InstId) {
|
||||
if (elem == SemIR::ImplWitnessTablePlaceholder::TypeInstId) {
|
||||
elem = SemIR::ErrorInst::InstId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user