mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 03:38:12 +00:00
Get equality requirements from the IdentifiedFacetType in impl lookup (#7944)
Instead of only getting rewrite/equality requirements from the declared facet type, impl lookup now uses the full IdentifiedFacetType of the query's constraint to get rewrite/equality requirements from named constraints as well.
This commit is contained in:
1 parent
51e2c76a8e
commit
5402b4c56e
7 files changed
+163
-147
No files matched your search
+9
-9
@@ -994,7 +994,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.f70: %T.as_type.as.Iterate.impl.NewCursor.type.290 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.79e: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.383) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.573: %T.as_type.as.Iterate.impl.Next.type.79e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.2b0: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.a35) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.b06: %Iterate_where.type.8d9 = facet_value %MutableRange, (%Iterate.impl_witness.a35) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.c79: %pattern_type.e63 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.94f: %pattern_type.e63 = wrapper_binding_pattern r, %r.param_patt.c79 [concrete]
|
||||
@@ -1037,10 +1036,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.356: %T.as_type.as.Iterate.impl.NewCursor.type.5c1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.f76: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.15e) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.259: %T.as_type.as.Iterate.impl.Next.type.f76 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.1c8: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.39d) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.3df: %Iterate_where.type.8d9 = facet_value %ConstRange, (%Iterate.impl_witness.39d) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.83e: %pattern_type.0ba = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.c21: %pattern_type.0ba = wrapper_binding_pattern r, %r.param_patt.83e [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.2b0: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.a35) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.ca0: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.2b0) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.8bc: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.2b0) [concrete]
|
||||
// CHECK:STDOUT: %.d4c: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.ca0, %Iterate.facet.2b0 [concrete]
|
||||
@@ -1049,6 +1048,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.7ef: <specific function> = specific_function %T.as_type.as.Iterate.impl.Next.573, @T.as_type.as.Iterate.impl.Next(%facet_value.383) [concrete]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.d1f: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.0fe) [concrete]
|
||||
// CHECK:STDOUT: %.0dc: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.d1f, %Destroy.facet.0fe [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.1c8: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.39d) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.97c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.1c8) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1c9: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.1c8) [concrete]
|
||||
// CHECK:STDOUT: %.582: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.97c, %Iterate.facet.1c8 [concrete]
|
||||
@@ -1819,7 +1819,6 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.a7b: %T.as_type.as.Iterate.impl.NewCursor.type.899 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.355: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.4bb) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.8ce: %T.as_type.as.Iterate.impl.Next.type.355 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.758: %Iterate.type = facet_value %DiffMutableRange, (%Iterate.impl_witness.606) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.2c1: %Iterate_where.type.b96 = facet_value %DiffMutableRange, (%Iterate.impl_witness.606) [concrete]
|
||||
// CHECK:STDOUT: %r.patt.5fe: %pattern_type.611 = ref_binding_pattern r [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.a4b: %pattern_type.611 = var_param_pattern %r.patt.5fe [concrete]
|
||||
@@ -1870,10 +1869,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.3cd: %T.as_type.as.Iterate.impl.NewCursor.type.4f6 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.885: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.683) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.d18: %T.as_type.as.Iterate.impl.Next.type.885 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.930: %Iterate.type = facet_value %DiffConstRange, (%Iterate.impl_witness.9b4) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.1fc: %Iterate_where.type.b96 = facet_value %DiffConstRange, (%Iterate.impl_witness.9b4) [concrete]
|
||||
// CHECK:STDOUT: %r.patt.9c0: %pattern_type.7dd = ref_binding_pattern r [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.992: %pattern_type.7dd = var_param_pattern %r.patt.9c0 [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.758: %Iterate.type = facet_value %DiffMutableRange, (%Iterate.impl_witness.606) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.49d: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.758) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1f8: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.758) [concrete]
|
||||
// CHECK:STDOUT: %.c05: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.49d, %Iterate.facet.758 [concrete]
|
||||
@@ -1882,6 +1881,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.288: <specific function> = specific_function %T.as_type.as.Iterate.impl.Next.8ce, @T.as_type.as.Iterate.impl.Next(%facet_value.4bb) [concrete]
|
||||
// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.baf: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.645) [concrete]
|
||||
// CHECK:STDOUT: %.085: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.baf, %Destroy.facet.645 [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.930: %Iterate.type = facet_value %DiffConstRange, (%Iterate.impl_witness.9b4) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.4f6: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.930) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.95d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.930) [concrete]
|
||||
// CHECK:STDOUT: %.b0d: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.4f6, %Iterate.facet.930 [concrete]
|
||||
@@ -2646,10 +2646,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.60e: %T.as_type.as.Iterate.impl.NewCursor.type.549 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.c07: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.8e3) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.23c: %T.as_type.as.Iterate.impl.Next.type.c07 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.a3e: %Iterate.type = facet_value %Range, (%Iterate.impl_witness.e03) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.637: %Iterate_where.type.2ee = facet_value %Range, (%Iterate.impl_witness.e03) [concrete]
|
||||
// CHECK:STDOUT: %r.patt.b9f: %pattern_type.23f = ref_binding_pattern r [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.466: %pattern_type.23f = var_param_pattern %r.patt.b9f [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.a3e: %Iterate.type = facet_value %Range, (%Iterate.impl_witness.e03) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b10: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.a3e) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.42b: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.a3e) [concrete]
|
||||
// CHECK:STDOUT: %.f2a: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b10, %Iterate.facet.a3e [concrete]
|
||||
@@ -3298,10 +3298,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.1ed: %T.as_type.as.Iterate.impl.NewCursor.type.35f = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.6c4: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.120) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.9ad: %T.as_type.as.Iterate.impl.Next.type.6c4 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.1a5: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.a53) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.36b: %Iterate_where.type.11d = facet_value %ConstRange, (%Iterate.impl_witness.a53) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.a73: %pattern_type.025 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.0b5: %pattern_type.025 = wrapper_binding_pattern r, %r.param_patt.a73 [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.1a5: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.a53) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.793: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.1a5) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.c0d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.1a5) [concrete]
|
||||
// CHECK:STDOUT: %.588: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.793, %Iterate.facet.1a5 [concrete]
|
||||
@@ -3947,10 +3947,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.f32: %T.as_type.as.Iterate.impl.NewCursor.type.c03 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.06b: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.c62) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.8a0: %T.as_type.as.Iterate.impl.Next.type.06b = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.8eb) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.da8: %Iterate_where.type.11d = facet_value %MutableRange, (%Iterate.impl_witness.8eb) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.aeb: %pattern_type.992 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.892: %pattern_type.992 = wrapper_binding_pattern r, %r.param_patt.aeb [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.8eb) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.601: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b38) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.63c: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b38) [concrete]
|
||||
// CHECK:STDOUT: %.177: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.601, %Iterate.facet.b38 [concrete]
|
||||
@@ -4599,10 +4599,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.437: %T.as_type.as.Iterate.impl.NewCursor.type.755 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.b75: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.d15) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.82c: %T.as_type.as.Iterate.impl.Next.type.b75 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.8d3: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.d1d) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.1d8: %Iterate_where.type.87e = facet_value %ConstRange, (%Iterate.impl_witness.d1d) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.ac5: %pattern_type.c1d = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.97f: %pattern_type.c1d = wrapper_binding_pattern r, %r.param_patt.ac5 [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.8d3: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.d1d) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.7f7: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.8d3) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.035: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.8d3) [concrete]
|
||||
// CHECK:STDOUT: %.8c0: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.7f7, %Iterate.facet.8d3 [concrete]
|
||||
@@ -5768,10 +5768,10 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd,
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.160: %T.as_type.as.Iterate.impl.NewCursor.type.212 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.6dd: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.24f) [concrete]
|
||||
// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.ddf: %T.as_type.as.Iterate.impl.Next.type.6dd = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.b30: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.198) [concrete]
|
||||
// CHECK:STDOUT: %facet_value.fc8: %Iterate_where.type.8b0 = facet_value %MutableAndConstRange, (%Iterate.impl_witness.198) [concrete]
|
||||
// CHECK:STDOUT: %r.param_patt.3a6: %pattern_type.fdb = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %r.patt.403: %pattern_type.fdb = wrapper_binding_pattern r, %r.param_patt.3a6 [concrete]
|
||||
// CHECK:STDOUT: %Iterate.facet.b30: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.198) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b5a: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b30) [concrete]
|
||||
// CHECK:STDOUT: %Iterate.WithSelf.Next.type.3b0: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b30) [concrete]
|
||||
// CHECK:STDOUT: %.bc1: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b5a, %Iterate.facet.b30 [concrete]
|
||||
|
||||
Reference in new issue
Block a user