소스 검색

Remove redundant ResolveSpecificDefinition (#6659)

Noted by danakj [on
Discord](https://discord.com/channels/655572317891461132/655578254970716160/1465435722205888748)
Jon Ross-Perkins 3 달 전
부모
커밋
9f6e84cc02
1개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 8
      toolchain/check/impl_lookup.cpp

+ 4 - 8
toolchain/check/impl_lookup.cpp

@@ -301,20 +301,16 @@ static auto GetWitnessIdForImpl(Context& context, SemIR::LocId loc_id,
 
   LoadImportRef(context, impl.witness_id);
   if (specific_id.has_value()) {
-    // Add an instruction to support requiring an impl definition which may not
-    // otherwise be generated. This is used to resolve dependency chains when
-    // `MakeFinal` is returned without a concrete definition; particularly final
-    // impls with symbolic constants.
+    // If the impl definition can be resolved, eval will do it immediately;
+    // otherwise, it can be resolved by further specialization. This is used to
+    // resolve dependency chains when `MakeFinal` is returned without a concrete
+    // definition; particularly final impls with symbolic constants.
     AddInstInNoBlock(
         context, loc_id,
         SemIR::RequireSpecificDefinition{
             .type_id = GetSingletonType(
                 context, SemIR::RequireSpecificDefinitionType::TypeInstId),
             .specific_id = specific_id});
-
-    // We need a definition of the specific `impl` so we can access its
-    // witness.
-    ResolveSpecificDefinition(context, loc_id, specific_id);
   }
 
   if (query_is_concrete || impl.is_final) {