mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 15:21:04 +01:00
Remove ValueParamPattern case from deduction (#6869)
This case is redundant: when deducing against a runtime parameter pattern, the type is all that matters, and the type is added to the deduction earlier. Additionally deducing the same argument against parameter's subpattern just creates duplicate work, because the subpattern has the same type.
This commit is contained in:
+2
-4
@@ -324,10 +324,8 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* {
|
||||
// CHECK:STDOUT: %Copy.ref: %Copy.type.4b4 = name_ref Copy, file.%Copy.decl [concrete = constants.%Copy]
|
||||
// CHECK:STDOUT: %c.ref: %Copyable = name_ref c, %c
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %Copy.facet.loc12_16.1: %Copy.type.fb2 = facet_value constants.%Copyable, (constants.%custom_witness.847) [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %.loc12_16.1: %Copy.type.fb2 = converted constants.%Copyable, %Copy.facet.loc12_16.1 [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %Copy.facet.loc12_16.2: %Copy.type.fb2 = facet_value constants.%Copyable, (constants.%custom_witness.847) [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %.loc12_16.2: %Copy.type.fb2 = converted constants.%Copyable, %Copy.facet.loc12_16.2 [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type.fb2 = facet_value constants.%Copyable, (constants.%custom_witness.847) [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %.loc12: %Copy.type.fb2 = converted constants.%Copyable, %Copy.facet [concrete = constants.%Copy.facet.c39]
|
||||
// CHECK:STDOUT: %Copy.specific_fn: <specific function> = specific_function %Copy.ref, @Copy.loc6(constants.%Copy.facet.c39) [concrete = constants.%Copy.specific_fn]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %Copy.call: init %Copyable to %.loc10_34.1 = call %Copy.specific_fn(%c.ref)
|
||||
|
||||
Reference in New Issue
Block a user