|
|
@@ -511,11 +511,10 @@ auto DeductionContext::Deduce() -> bool {
|
|
|
static auto GetEntityNameForGenericBinding(Context& context,
|
|
|
SemIR::InstId binding_id)
|
|
|
-> SemIR::NameId {
|
|
|
- // If `binding_id` is imported, it may not have an entity name. Get a
|
|
|
- // canonical local instruction from its constant value which does.
|
|
|
- if (context.insts().Is<SemIR::ImportRefLoaded>(binding_id)) {
|
|
|
- binding_id = context.constant_values().GetConstantInstId(binding_id);
|
|
|
- }
|
|
|
+ // If `binding_id` is imported (or referenced indirectly perhaps in the
|
|
|
+ // future), it may not have an entity name. Get a canonical local instruction
|
|
|
+ // from its constant value which does.
|
|
|
+ binding_id = context.constant_values().GetConstantInstId(binding_id);
|
|
|
|
|
|
if (auto bind_name =
|
|
|
context.insts().TryGetAs<SemIR::AnyBindName>(binding_id)) {
|