Skip to content

Commit de2d1e8

Browse files
committed
Allow dependendent specific definition resolution
1 parent db150ff commit de2d1e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+819
-201
lines changed

toolchain/check/eval_inst.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,12 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
516516
return ConstantEvalResult::NewSamePhase(inst);
517517
}
518518

519+
auto EvalConstantInst(Context& context, SemIR::RequireSpecificDefinition inst)
520+
-> ConstantEvalResult {
521+
ResolveSpecificDefinition(context, SemIR::LocId::None, inst.specific_id);
522+
return ConstantEvalResult::NewSamePhase(inst);
523+
}
524+
519525
auto EvalConstantInst(Context& context, SemIR::SpecificConstant inst)
520526
-> ConstantEvalResult {
521527
// Pull the constant value out of the specific.

toolchain/check/generic.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ auto ResolveSpecificDefinition(Context& context, SemIR::LocId loc_id,
719719
if (!specific.definition_block_id.has_value()) {
720720
// Evaluate the eval block for the definition of the generic.
721721
auto& generic = context.generics().Get(generic_id);
722+
CARBON_CHECK(generic.decl_block_id.has_value(), "missing declaration");
722723
if (!generic.definition_block_id.has_value()) {
723724
// The generic is not defined yet.
724725
return false;

toolchain/check/impl_lookup.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,15 @@ static auto GetWitnessIdForImpl(Context& context, SemIR::LocId loc_id,
240240

241241
// The self type of the impl must match the type in the query, or this is an
242242
// `impl T as ...` for some other type `T` and should not be considered.
243-
auto deduced_self_const_id = SemIR::GetConstantValueInSpecific(
243+
auto noncanonical_deduced_self_const_id = SemIR::GetConstantValueInSpecific(
244244
context.sem_ir(), specific_id, impl.self_id);
245+
245246
// In a generic `impl forall` the self type can be a FacetAccessType, which
246247
// will not be the same constant value as a query facet value. We move through
247248
// to the facet value here, and if the query was a FacetAccessType we did the
248249
// same there so they still match.
249-
deduced_self_const_id =
250-
GetCanonicalFacetOrTypeValue(context, deduced_self_const_id);
250+
auto deduced_self_const_id =
251+
GetCanonicalFacetOrTypeValue(context, noncanonical_deduced_self_const_id);
251252
if (query_self_const_id != deduced_self_const_id) {
252253
return EvalImplLookupResult::MakeNone();
253254
}
@@ -288,6 +289,16 @@ static auto GetWitnessIdForImpl(Context& context, SemIR::LocId loc_id,
288289

289290
LoadImportRef(context, impl.witness_id);
290291
if (specific_id.has_value()) {
292+
// When working with a symbolic constant and a `final` impl, add an
293+
// instruction to support requiring an impl definition which may not
294+
// otherwise be generated.
295+
AddInstInNoBlock(
296+
context, loc_id,
297+
SemIR::RequireSpecificDefinition{
298+
.type_id = GetSingletonType(
299+
context, SemIR::RequireSpecificDefinitionType::TypeInstId),
300+
.specific_id = specific_id});
301+
291302
// We need a definition of the specific `impl` so we can access its
292303
// witness.
293304
ResolveSpecificDefinition(context, loc_id, specific_id);

toolchain/check/import_ref.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,31 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
30543054
.complete_type_inst_id = complete_type_inst_id});
30553055
}
30563056

3057+
static auto TryResolveTypedInst(ImportRefResolver& resolver,
3058+
SemIR::RequireSpecificDefinition inst)
3059+
-> ResolveResult {
3060+
return ResolveResult::Done(SemIR::ErrorInst::ConstantId,
3061+
SemIR::ErrorInst::InstId);
3062+
3063+
CARBON_CHECK(resolver.import_types().GetInstId(inst.type_id) ==
3064+
SemIR::RequireSpecificDefinitionType::TypeInstId);
3065+
3066+
auto specific_data = GetLocalSpecificData(resolver, inst.specific_id);
3067+
3068+
if (resolver.HasNewWork()) {
3069+
return ResolveResult::Retry();
3070+
}
3071+
3072+
auto specific_id =
3073+
GetOrAddLocalSpecific(resolver, inst.specific_id, specific_data);
3074+
3075+
return ResolveAsDeduplicated<SemIR::RequireSpecificDefinition>(
3076+
resolver, {.type_id = GetSingletonType(
3077+
resolver.local_context(),
3078+
SemIR::RequireSpecificDefinitionType::TypeInstId),
3079+
.specific_id = specific_id});
3080+
}
3081+
30573082
static auto TryResolveTypedInst(ImportRefResolver& resolver,
30583083
SemIR::ReturnSlotPattern inst,
30593084
SemIR::InstId import_inst_id) -> ResolveResult {
@@ -3522,6 +3547,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver,
35223547
case CARBON_KIND(SemIR::RequireCompleteType inst): {
35233548
return TryResolveTypedInst(resolver, inst);
35243549
}
3550+
case CARBON_KIND(SemIR::RequireSpecificDefinition inst): {
3551+
return TryResolveTypedInst(resolver, inst);
3552+
}
35253553
case CARBON_KIND(SemIR::ReturnSlotPattern inst): {
35263554
return TryResolveTypedInst(resolver, inst, constant_inst_id);
35273555
}

toolchain/check/testdata/array/init_dependent_bound.carbon

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ fn H() { G(3); }
7878
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc4: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.30f) [symbolic]
7979
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.44f: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc4 = struct_value () [symbolic]
8080
// CHECK:STDOUT: %require_complete.2e8: <witness> = require_complete_type %ptr.a86 [symbolic]
81+
// CHECK:STDOUT: %.019: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.30f) [symbolic]
8182
// CHECK:STDOUT: %Destroy.facet.49e: %Destroy.type = facet_value %array_type.512, (%Destroy.impl_witness.aa0) [symbolic]
8283
// CHECK:STDOUT: %.fb1: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.49e [symbolic]
8384
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.91d: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.44f, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.30f) [symbolic]
@@ -89,12 +90,13 @@ fn H() { G(3); }
8990
// CHECK:STDOUT: %array.2e5: %array_type.6f1 = tuple_value () [concrete]
9091
// CHECK:STDOUT: %facet_value.cba: %type_where = facet_value %array_type.6f1, () [concrete]
9192
// CHECK:STDOUT: %Destroy.impl_witness.dff: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.cba) [concrete]
92-
// CHECK:STDOUT: %Destroy.facet.105: %Destroy.type = facet_value %array_type.6f1, (%Destroy.impl_witness.dff) [concrete]
93-
// CHECK:STDOUT: %.0c7: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.105 [concrete]
9493
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc8: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.cba) [concrete]
9594
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.dcd: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc8 = struct_value () [concrete]
96-
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.bf3: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.dcd, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.cba) [concrete]
9795
// CHECK:STDOUT: %complete_type.3e1: <witness> = complete_type_witness %ptr.cf4 [concrete]
96+
// CHECK:STDOUT: %.793: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.cba) [concrete]
97+
// CHECK:STDOUT: %Destroy.facet.105: %Destroy.type = facet_value %array_type.6f1, (%Destroy.impl_witness.dff) [concrete]
98+
// CHECK:STDOUT: %.0c7: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.105 [concrete]
99+
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.bf3: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.dcd, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.cba) [concrete]
98100
// CHECK:STDOUT: }
99101
// CHECK:STDOUT:
100102
// CHECK:STDOUT: imports {
@@ -111,9 +113,10 @@ fn H() { G(3); }
111113
// CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc7_22.2 [symbolic = %pattern_type (constants.%pattern_type.b5c)]
112114
// CHECK:STDOUT: %array: @G.%array_type.loc7_22.2 (%array_type.512) = tuple_value () [symbolic = %array (constants.%array.8ba)]
113115
// CHECK:STDOUT: %facet_value: %type_where = facet_value %array_type.loc7_22.2, () [symbolic = %facet_value (constants.%facet_value.30f)]
116+
// CHECK:STDOUT: %.loc7_3.2: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %.loc7_3.2 (constants.%.019)]
114117
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.aa0)]
115118
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc7_22.2, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.49e)]
116-
// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.fb1)]
119+
// CHECK:STDOUT: %.loc7_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.3 (constants.%.fb1)]
117120
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc4)]
118121
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @G.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc4) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.44f)]
119122
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.91d)]
@@ -137,7 +140,7 @@ fn H() { G(3); }
137140
// CHECK:STDOUT: %array_type.loc7_22.1: type = array_type %int_0, %T.ref [symbolic = %array_type.loc7_22.2 (constants.%array_type.512)]
138141
// CHECK:STDOUT: }
139142
// CHECK:STDOUT: %arr: ref @G.%array_type.loc7_22.2 (%array_type.512) = ref_binding arr, %arr.var
140-
// CHECK:STDOUT: %impl.elem0: @G.%.loc7_3.2 (%.fb1) = impl_witness_access constants.%Destroy.impl_witness.aa0, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.44f)]
143+
// CHECK:STDOUT: %impl.elem0: @G.%.loc7_3.3 (%.fb1) = impl_witness_access constants.%Destroy.impl_witness.aa0, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.44f)]
141144
// CHECK:STDOUT: %bound_method.loc7_3.1: <bound method> = bound_method %arr.var, %impl.elem0
142145
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.30f) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.91d)]
143146
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %arr.var, %specific_fn
@@ -160,9 +163,10 @@ fn H() { G(3); }
160163
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c8
161164
// CHECK:STDOUT: %array => constants.%array.2e5
162165
// CHECK:STDOUT: %facet_value => constants.%facet_value.cba
166+
// CHECK:STDOUT: %.loc7_3.2 => constants.%.793
163167
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.dff
164168
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.105
165-
// CHECK:STDOUT: %.loc7_3.2 => constants.%.0c7
169+
// CHECK:STDOUT: %.loc7_3.3 => constants.%.0c7
166170
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.cc8
167171
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.dcd
168172
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.bf3

toolchain/check/testdata/class/destroy_calls.carbon

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,20 +391,22 @@ fn G() { F({}); }
391391
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.76f: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.7d9 = struct_value () [template]
392392
// CHECK:STDOUT: %ptr.d75: type = ptr_type %C.3f0 [template]
393393
// CHECK:STDOUT: %require_complete.ba9: <witness> = require_complete_type %ptr.d75 [template]
394+
// CHECK:STDOUT: %.3ed: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.bf8) [template]
394395
// CHECK:STDOUT: %Destroy.facet.a5b: %Destroy.type = facet_value %C.3f0, (%Destroy.impl_witness.a59) [template]
395396
// CHECK:STDOUT: %.4c5: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.a5b [template]
396397
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.5e4: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.76f, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.bf8) [template]
397398
// CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete]
398399
// CHECK:STDOUT: %pattern_type.99a: type = pattern_type %C.7a7 [concrete]
399400
// CHECK:STDOUT: %facet_value.036: %type_where = facet_value %C.7a7, () [concrete]
400401
// CHECK:STDOUT: %Destroy.impl_witness.8e7: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.036) [concrete]
401-
// CHECK:STDOUT: %Destroy.facet.056: %Destroy.type = facet_value %C.7a7, (%Destroy.impl_witness.8e7) [concrete]
402-
// CHECK:STDOUT: %.1c0: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.056 [concrete]
403402
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3a: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.036) [concrete]
404403
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.b3a: %DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3a = struct_value () [concrete]
405404
// CHECK:STDOUT: %ptr.308: type = ptr_type %C.7a7 [concrete]
406-
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a93: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.b3a, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.036) [concrete]
407405
// CHECK:STDOUT: %complete_type.903: <witness> = complete_type_witness %ptr.308 [concrete]
406+
// CHECK:STDOUT: %.8e4: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value.036) [concrete]
407+
// CHECK:STDOUT: %Destroy.facet.056: %Destroy.type = facet_value %C.7a7, (%Destroy.impl_witness.8e7) [concrete]
408+
// CHECK:STDOUT: %.1c0: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.056 [concrete]
409+
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a93: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op.b3a, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value.036) [concrete]
408410
// CHECK:STDOUT: }
409411
// CHECK:STDOUT:
410412
// CHECK:STDOUT: imports {
@@ -429,9 +431,10 @@ fn G() { F({}); }
429431
// CHECK:STDOUT: %require_complete.loc7_13: <witness> = require_complete_type %C.loc7_13.2 [template = %require_complete.loc7_13 (constants.%require_complete.c98)]
430432
// CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc7_13.2 [template = %pattern_type (constants.%pattern_type.06f)]
431433
// CHECK:STDOUT: %facet_value: %type_where = facet_value %C.loc7_13.2, () [template = %facet_value (constants.%facet_value.bf8)]
434+
// CHECK:STDOUT: %.loc7_3.1: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [template = %.loc7_3.1 (constants.%.3ed)]
432435
// CHECK:STDOUT: %Destroy.impl_witness: <witness> = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [template = %Destroy.impl_witness (constants.%Destroy.impl_witness.a59)]
433436
// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.loc7_13.2, (%Destroy.impl_witness) [template = %Destroy.facet (constants.%Destroy.facet.a5b)]
434-
// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [template = %.loc7_3 (constants.%.4c5)]
437+
// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [template = %.loc7_3.2 (constants.%.4c5)]
435438
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [template = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.7d9)]
436439
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @F.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.7d9) = struct_value () [template = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.76f)]
437440
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: <specific function> = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [template = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.5e4)]
@@ -451,7 +454,7 @@ fn G() { F({}); }
451454
// CHECK:STDOUT: %C.loc7_13.1: type = class_type @C, @C(constants.%T) [template = %C.loc7_13.2 (constants.%C.3f0)]
452455
// CHECK:STDOUT: }
453456
// CHECK:STDOUT: %v: ref @F.%C.loc7_13.2 (%C.3f0) = ref_binding v, %v.var
454-
// CHECK:STDOUT: %impl.elem0: @F.%.loc7_3 (%.4c5) = impl_witness_access constants.%Destroy.impl_witness.a59, element0 [template = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.76f)]
457+
// CHECK:STDOUT: %impl.elem0: @F.%.loc7_3.2 (%.4c5) = impl_witness_access constants.%Destroy.impl_witness.a59, element0 [template = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.76f)]
455458
// CHECK:STDOUT: %bound_method.loc7_3.1: <bound method> = bound_method %v.var, %impl.elem0
456459
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.bf8) [template = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.5e4)]
457460
// CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %v.var, %specific_fn
@@ -473,9 +476,10 @@ fn G() { F({}); }
473476
// CHECK:STDOUT: %require_complete.loc7_13 => constants.%complete_type.357
474477
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.99a
475478
// CHECK:STDOUT: %facet_value => constants.%facet_value.036
479+
// CHECK:STDOUT: %.loc7_3.1 => constants.%.8e4
476480
// CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.8e7
477481
// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.056
478-
// CHECK:STDOUT: %.loc7_3 => constants.%.1c0
482+
// CHECK:STDOUT: %.loc7_3.2 => constants.%.1c0
479483
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.c3a
480484
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.b3a
481485
// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.a93

0 commit comments

Comments
 (0)