Don't require non-class types to be complete to convert from them (#7590)

In Convert, we require the source value's type to be compete so that we
can look for `base` classes and `adapt` relationships. However these can
only be present in a `ClassType`, so we only need `ClassType`s to be
complete.

Reduce the requirement in Convert to not complete types that are not a
`ClassType`, and which can not contain a `ClassType` as part of their
class.

Ideally we would only _only_ require the `ClassType` itself to be
complete, and only if we're looking for a base or adapt. However lower
depends on us completing all Convert source types that contain a class.
This seems to suggest we're lacking checks for complete types somewhere
else and Convert is making up for it. A TODO has been added. The
`toolchain/driver/testdata/compile/optimize/optimize_debug.carbon` test
is an example that CHECKs due to failing to verify the LLVM module if we
do not compute the complete type of all class-containing types in
Convert.

The critical step this PR is doing is to stop trying to complete a
`FacetType` when converting from a facet. This avoids trying to complete
a named constraint when converting `Self` inside that named constraint.
Doing so causes a cycle when the conversion of `Self` is performed in
eval of an `extend require` decl, since requiring the named constraint
to be complete re-evaluates the `extend require` decl again. A test is
added that crashed in an infinite loop before this change.

It also depends on #7584, which was intended to be an optimization but
is now load bearing. Because converting `Self` leaves an impl lookup
inst behind, and if that inst is re-evaluated inside impl lookup (by
forming a specific of a `require` decl through identify) then we have a
similar cycle.
This commit is contained in:
Dana Jansens
2026-07-31 17:35:21 +00:00
committed by GitHub
parent 6429c1655c
commit 9b8a2124b9
21 changed files with 172 additions and 214 deletions
@@ -4069,9 +4069,7 @@ fn F() {
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: }
// CHECK:STDOUT: specific @I.WithSelf(constants.%Self) {}
// CHECK:STDOUT:
// CHECK:STDOUT: specific @EchoValue(constants.%ValueT, constants.%value) {
// CHECK:STDOUT: %ValueT.patt.loc10_20.2 => constants.%ValueT.patt
@@ -1059,8 +1059,6 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.82d: type = pattern_type %AddAssignWith.type.2c8890.2 [symbolic]
// CHECK:STDOUT: %T.patt.a22: %pattern_type.82d = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.792: %AddAssignWith.type.2c8890.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %AddAssignWith.assoc_type.8ddaf4.2: type = assoc_entity_type @AddAssignWith.1, @AddAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.8c5739.2: %AddAssignWith.assoc_type.8ddaf4.2 = assoc_entity element0, imports.%Core.import_ref.3b2 [symbolic]
// CHECK:STDOUT: %T.as_type.50c: type = facet_access_type %T.792 [symbolic]
// CHECK:STDOUT: %pattern_type.643306.2: type = pattern_type %T.as_type.50c [symbolic]
// CHECK:STDOUT: %x.patt.227: %pattern_type.643306.2 = ref_binding_pattern x [symbolic]
@@ -1068,6 +1066,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.51d1c4.4: type = pattern_type %U.67d [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.4 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.4 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %AddAssignWith.assoc_type.8ddaf4.2: type = assoc_entity_type @AddAssignWith.1, @AddAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.8c5739.2: %AddAssignWith.assoc_type.8ddaf4.2 = assoc_entity element0, imports.%Core.import_ref.3b2 [symbolic]
// CHECK:STDOUT: %require_complete.2a8: <witness> = require_complete_type %AddAssignWith.type.2c8890.2 [symbolic]
// CHECK:STDOUT: %assoc0.86d: %AddAssignWith.assoc_type.8ddaf4.1 = assoc_entity element0, imports.%Core.import_ref.87e [symbolic]
// CHECK:STDOUT: %AddAssignWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.792, @AddAssignWith.1, @AddAssignWith.1(%U.67d) [symbolic]
@@ -1084,12 +1084,12 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.260: type = pattern_type %SubAssignWith.type.7e53cf.2 [symbolic]
// CHECK:STDOUT: %T.patt.f45: %pattern_type.260 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.f6c: %SubAssignWith.type.7e53cf.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %SubAssignWith.assoc_type.6e3877.2: type = assoc_entity_type @SubAssignWith.1, @SubAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.701e5f.2: %SubAssignWith.assoc_type.6e3877.2 = assoc_entity element0, imports.%Core.import_ref.8f2 [symbolic]
// CHECK:STDOUT: %T.as_type.3ff: type = facet_access_type %T.f6c [symbolic]
// CHECK:STDOUT: %pattern_type.f08ed5.2: type = pattern_type %T.as_type.3ff [symbolic]
// CHECK:STDOUT: %x.patt.95a: %pattern_type.f08ed5.2 = ref_binding_pattern x [symbolic]
// CHECK:STDOUT: %x.param_patt.a45: %pattern_type.f08ed5.2 = var_param_pattern %x.patt.95a [symbolic]
// CHECK:STDOUT: %SubAssignWith.assoc_type.6e3877.2: type = assoc_entity_type @SubAssignWith.1, @SubAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.701e5f.2: %SubAssignWith.assoc_type.6e3877.2 = assoc_entity element0, imports.%Core.import_ref.8f2 [symbolic]
// CHECK:STDOUT: %require_complete.862: <witness> = require_complete_type %SubAssignWith.type.7e53cf.2 [symbolic]
// CHECK:STDOUT: %assoc0.b8e: %SubAssignWith.assoc_type.6e3877.1 = assoc_entity element0, imports.%Core.import_ref.e7f [symbolic]
// CHECK:STDOUT: %SubAssignWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.f6c, @SubAssignWith.1, @SubAssignWith.1(%U.67d) [symbolic]
@@ -1106,12 +1106,12 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.8c2: type = pattern_type %MulAssignWith.type.3a0e4d.2 [symbolic]
// CHECK:STDOUT: %T.patt.db5: %pattern_type.8c2 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.64d: %MulAssignWith.type.3a0e4d.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %MulAssignWith.assoc_type.9aa18f.2: type = assoc_entity_type @MulAssignWith.1, @MulAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.22264a.2: %MulAssignWith.assoc_type.9aa18f.2 = assoc_entity element0, imports.%Core.import_ref.ba3 [symbolic]
// CHECK:STDOUT: %T.as_type.1de: type = facet_access_type %T.64d [symbolic]
// CHECK:STDOUT: %pattern_type.8bf366.2: type = pattern_type %T.as_type.1de [symbolic]
// CHECK:STDOUT: %x.patt.4e9: %pattern_type.8bf366.2 = ref_binding_pattern x [symbolic]
// CHECK:STDOUT: %x.param_patt.6c8: %pattern_type.8bf366.2 = var_param_pattern %x.patt.4e9 [symbolic]
// CHECK:STDOUT: %MulAssignWith.assoc_type.9aa18f.2: type = assoc_entity_type @MulAssignWith.1, @MulAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.22264a.2: %MulAssignWith.assoc_type.9aa18f.2 = assoc_entity element0, imports.%Core.import_ref.ba3 [symbolic]
// CHECK:STDOUT: %require_complete.6b1: <witness> = require_complete_type %MulAssignWith.type.3a0e4d.2 [symbolic]
// CHECK:STDOUT: %assoc0.2ec: %MulAssignWith.assoc_type.9aa18f.1 = assoc_entity element0, imports.%Core.import_ref.408 [symbolic]
// CHECK:STDOUT: %MulAssignWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.64d, @MulAssignWith.1, @MulAssignWith.1(%U.67d) [symbolic]
@@ -1128,12 +1128,12 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.f74: type = pattern_type %DivAssignWith.type.7e58ca.2 [symbolic]
// CHECK:STDOUT: %T.patt.9a5: %pattern_type.f74 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.c33: %DivAssignWith.type.7e58ca.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %DivAssignWith.assoc_type.bb68ec.2: type = assoc_entity_type @DivAssignWith.1, @DivAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.32f100.2: %DivAssignWith.assoc_type.bb68ec.2 = assoc_entity element0, imports.%Core.import_ref.a5d [symbolic]
// CHECK:STDOUT: %T.as_type.e57: type = facet_access_type %T.c33 [symbolic]
// CHECK:STDOUT: %pattern_type.da303b.2: type = pattern_type %T.as_type.e57 [symbolic]
// CHECK:STDOUT: %x.patt.cf6: %pattern_type.da303b.2 = ref_binding_pattern x [symbolic]
// CHECK:STDOUT: %x.param_patt.660: %pattern_type.da303b.2 = var_param_pattern %x.patt.cf6 [symbolic]
// CHECK:STDOUT: %DivAssignWith.assoc_type.bb68ec.2: type = assoc_entity_type @DivAssignWith.1, @DivAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.32f100.2: %DivAssignWith.assoc_type.bb68ec.2 = assoc_entity element0, imports.%Core.import_ref.a5d [symbolic]
// CHECK:STDOUT: %require_complete.c5c: <witness> = require_complete_type %DivAssignWith.type.7e58ca.2 [symbolic]
// CHECK:STDOUT: %assoc0.de1: %DivAssignWith.assoc_type.bb68ec.1 = assoc_entity element0, imports.%Core.import_ref.df2 [symbolic]
// CHECK:STDOUT: %DivAssignWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.c33, @DivAssignWith.1, @DivAssignWith.1(%U.67d) [symbolic]
@@ -1150,12 +1150,12 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) {
// CHECK:STDOUT: %pattern_type.fb8: type = pattern_type %ModAssignWith.type.778d68.2 [symbolic]
// CHECK:STDOUT: %T.patt.c29: %pattern_type.fb8 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.bca: %ModAssignWith.type.778d68.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %ModAssignWith.assoc_type.bc79ec.2: type = assoc_entity_type @ModAssignWith.1, @ModAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.8c0719.2: %ModAssignWith.assoc_type.bc79ec.2 = assoc_entity element0, imports.%Core.import_ref.cf6 [symbolic]
// CHECK:STDOUT: %T.as_type.ce6: type = facet_access_type %T.bca [symbolic]
// CHECK:STDOUT: %pattern_type.1d5f30.2: type = pattern_type %T.as_type.ce6 [symbolic]
// CHECK:STDOUT: %x.patt.fa4: %pattern_type.1d5f30.2 = ref_binding_pattern x [symbolic]
// CHECK:STDOUT: %x.param_patt.749: %pattern_type.1d5f30.2 = var_param_pattern %x.patt.fa4 [symbolic]
// CHECK:STDOUT: %ModAssignWith.assoc_type.bc79ec.2: type = assoc_entity_type @ModAssignWith.1, @ModAssignWith.1(%U.67d) [symbolic]
// CHECK:STDOUT: %assoc0.8c0719.2: %ModAssignWith.assoc_type.bc79ec.2 = assoc_entity element0, imports.%Core.import_ref.cf6 [symbolic]
// CHECK:STDOUT: %require_complete.680: <witness> = require_complete_type %ModAssignWith.type.778d68.2 [symbolic]
// CHECK:STDOUT: %assoc0.0f3: %ModAssignWith.assoc_type.bc79ec.1 = assoc_entity element0, imports.%Core.import_ref.d29 [symbolic]
// CHECK:STDOUT: %ModAssignWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.bca, @ModAssignWith.1, @ModAssignWith.1(%U.67d) [symbolic]
@@ -375,9 +375,6 @@ fn Test(only_neq: Cpp.OnlyNeq,
// CHECK:STDOUT: %pattern_type.3d4: type = pattern_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %T.patt.6b9: %pattern_type.3d4 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T: %EqWith.type.98ea86.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %pattern_type.e6374a.2: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %x.param_patt.aa2: %pattern_type.e6374a.2 = value_param_pattern [symbolic]
@@ -385,6 +382,9 @@ fn Test(only_neq: Cpp.OnlyNeq,
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.2 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %require_complete.fb5: <witness> = require_complete_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %assoc0.d00: %EqWith.assoc_type.85b122.1 = assoc_entity element0, imports.%Core.import_ref.2e5 [symbolic]
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @EqWith.1, @EqWith.1(%U) [symbolic]
@@ -545,9 +545,6 @@ fn Test(only_neq: Cpp.OnlyNeq,
// CHECK:STDOUT: %pattern_type.3d4: type = pattern_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %T.patt.6b9: %pattern_type.3d4 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T: %EqWith.type.98ea86.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %pattern_type.e6374a.2: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %x.param_patt.aa2: %pattern_type.e6374a.2 = value_param_pattern [symbolic]
@@ -555,6 +552,9 @@ fn Test(only_neq: Cpp.OnlyNeq,
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.2 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %require_complete.fb5: <witness> = require_complete_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %assoc0.d00: %EqWith.assoc_type.85b122.1 = assoc_entity element0, imports.%Core.import_ref.2e5 [symbolic]
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @EqWith.1, @EqWith.1(%U) [symbolic]
@@ -411,11 +411,6 @@ fn Test(missing_less: Cpp.MissingLess,
// CHECK:STDOUT: %pattern_type.ebc: type = pattern_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %T.patt.aaa: %pattern_type.ebc = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T: %OrderedWith.type.32ae87.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2e6f.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.c0023b.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic]
// CHECK:STDOUT: %assoc1.3efd77.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic]
// CHECK:STDOUT: %assoc2.48eff0.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element2, imports.%Core.import_ref.385 [symbolic]
// CHECK:STDOUT: %assoc3.5d53f7.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element3, imports.%Core.import_ref.39b [symbolic]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %pattern_type.f6ec4f.2: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %x.param_patt.a58: %pattern_type.f6ec4f.2 = value_param_pattern [symbolic]
@@ -423,6 +418,11 @@ fn Test(missing_less: Cpp.MissingLess,
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.2 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2e6f.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.c0023b.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic]
// CHECK:STDOUT: %assoc1.3efd77.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic]
// CHECK:STDOUT: %assoc2.48eff0.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element2, imports.%Core.import_ref.385 [symbolic]
// CHECK:STDOUT: %assoc3.5d53f7.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element3, imports.%Core.import_ref.39b [symbolic]
// CHECK:STDOUT: %require_complete.3c0: <witness> = require_complete_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %assoc0.13c: %OrderedWith.assoc_type.1d2e6f.1 = assoc_entity element0, imports.%Core.import_ref.447 [symbolic]
// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
@@ -653,11 +653,6 @@ fn Test(missing_less: Cpp.MissingLess,
// CHECK:STDOUT: %pattern_type.ebc: type = pattern_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %T.patt.aaa: %pattern_type.ebc = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T: %OrderedWith.type.32ae87.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2e6f.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.c0023b.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic]
// CHECK:STDOUT: %assoc1.3efd77.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic]
// CHECK:STDOUT: %assoc2.48eff0.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element2, imports.%Core.import_ref.385 [symbolic]
// CHECK:STDOUT: %assoc3.5d53f7.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element3, imports.%Core.import_ref.39b [symbolic]
// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic]
// CHECK:STDOUT: %pattern_type.f6ec4f.2: type = pattern_type %T.as_type [symbolic]
// CHECK:STDOUT: %x.param_patt.a58: %pattern_type.f6ec4f.2 = value_param_pattern [symbolic]
@@ -665,6 +660,11 @@ fn Test(missing_less: Cpp.MissingLess,
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.2 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2e6f.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.c0023b.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic]
// CHECK:STDOUT: %assoc1.3efd77.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic]
// CHECK:STDOUT: %assoc2.48eff0.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element2, imports.%Core.import_ref.385 [symbolic]
// CHECK:STDOUT: %assoc3.5d53f7.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element3, imports.%Core.import_ref.39b [symbolic]
// CHECK:STDOUT: %require_complete.3c0: <witness> = require_complete_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %assoc0.13c: %OrderedWith.assoc_type.1d2e6f.1 = assoc_entity element0, imports.%Core.import_ref.447 [symbolic]
// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: <witness> = lookup_impl_witness %T, @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
@@ -244,9 +244,6 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) {
// CHECK:STDOUT: %pattern_type.3d4: type = pattern_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %T.patt.6b9: %pattern_type.3d4 = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.d94: %EqWith.type.98ea86.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %T.as_type.93d: type = facet_access_type %T.d94 [symbolic]
// CHECK:STDOUT: %pattern_type.e6374a.2: type = pattern_type %T.as_type.93d [symbolic]
// CHECK:STDOUT: %x.param_patt.aa2: %pattern_type.e6374a.2 = value_param_pattern [symbolic]
@@ -254,6 +251,9 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) {
// CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic]
// CHECK:STDOUT: %y.param_patt.be3: %pattern_type.51d1c4.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %y.patt.b85: %pattern_type.51d1c4.2 = at_binding_pattern y, %y.param_patt.be3 [symbolic]
// CHECK:STDOUT: %EqWith.assoc_type.85b122.2: type = assoc_entity_type @EqWith.1, @EqWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.eee873.2: %EqWith.assoc_type.85b122.2 = assoc_entity element0, imports.%Core.import_ref.5ba [symbolic]
// CHECK:STDOUT: %assoc1.0ffc88.2: %EqWith.assoc_type.85b122.2 = assoc_entity element1, imports.%Core.import_ref.03f [symbolic]
// CHECK:STDOUT: %require_complete.fb5: <witness> = require_complete_type %EqWith.type.98ea86.2 [symbolic]
// CHECK:STDOUT: %assoc0.d00: %EqWith.assoc_type.85b122.1 = assoc_entity element0, imports.%Core.import_ref.2e5 [symbolic]
// CHECK:STDOUT: %EqWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.d94, @EqWith.1, @EqWith.1(%U) [symbolic]
@@ -281,15 +281,15 @@ fn Test(returns_strong_ordering: Cpp.ReturnsStrongOrdering) {
// CHECK:STDOUT: %pattern_type.ebc: type = pattern_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %T.patt.aaa: %pattern_type.ebc = symbolic_binding_pattern T, 1 [symbolic]
// CHECK:STDOUT: %T.7df: %OrderedWith.type.32ae87.2 = symbolic_binding T, 1 [symbolic]
// CHECK:STDOUT: %T.as_type.262: type = facet_access_type %T.7df [symbolic]
// CHECK:STDOUT: %pattern_type.f6ec4f.2: type = pattern_type %T.as_type.262 [symbolic]
// CHECK:STDOUT: %x.param_patt.a58: %pattern_type.f6ec4f.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %x.patt.140: %pattern_type.f6ec4f.2 = at_binding_pattern x, %x.param_patt.a58 [symbolic]
// CHECK:STDOUT: %OrderedWith.assoc_type.1d2e6f.2: type = assoc_entity_type @OrderedWith.1, @OrderedWith.1(%U) [symbolic]
// CHECK:STDOUT: %assoc0.c0023b.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element0, imports.%Core.import_ref.e7a [symbolic]
// CHECK:STDOUT: %assoc1.3efd77.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element1, imports.%Core.import_ref.3f7 [symbolic]
// CHECK:STDOUT: %assoc2.48eff0.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element2, imports.%Core.import_ref.385 [symbolic]
// CHECK:STDOUT: %assoc3.5d53f7.2: %OrderedWith.assoc_type.1d2e6f.2 = assoc_entity element3, imports.%Core.import_ref.39b [symbolic]
// CHECK:STDOUT: %T.as_type.262: type = facet_access_type %T.7df [symbolic]
// CHECK:STDOUT: %pattern_type.f6ec4f.2: type = pattern_type %T.as_type.262 [symbolic]
// CHECK:STDOUT: %x.param_patt.a58: %pattern_type.f6ec4f.2 = value_param_pattern [symbolic]
// CHECK:STDOUT: %x.patt.140: %pattern_type.f6ec4f.2 = at_binding_pattern x, %x.param_patt.a58 [symbolic]
// CHECK:STDOUT: %require_complete.3c0: <witness> = require_complete_type %OrderedWith.type.32ae87.2 [symbolic]
// CHECK:STDOUT: %assoc0.13c: %OrderedWith.assoc_type.1d2e6f.1 = assoc_entity element0, imports.%Core.import_ref.447 [symbolic]
// CHECK:STDOUT: %OrderedWith.lookup_impl_witness: <witness> = lookup_impl_witness %T.7df, @OrderedWith.1, @OrderedWith.1(%U) [symbolic]