about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-22 19:53:39 +0000
committerbors <bors@rust-lang.org>2023-05-22 19:53:39 +0000
commit2120c913c28896ed8e6247906f8884939c268683 (patch)
tree79bfe1b0813ba0c40ed60d51efbf36f3b1667a5b /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff
parent7ac161ce77dfa31dc39337c2543a1d777e70c16e (diff)
parent01f42d240570fd933fb6407a7b010dbab53563ff (diff)
downloadrust-2120c913c28896ed8e6247906f8884939c268683.tar.gz
rust-2120c913c28896ed8e6247906f8884939c268683.zip
Auto merge of #14872 - lowr:fix/ref-pat-with-type-var, r=HKalbasi
fix: introduce new type var when expectation for ref pat is not ref

Fixes #14840

When we infer the type of ref patterns, its expected type may not be reference type: 1) expected type is an unresolved inference variable, or 2) expected type is erroneously other kind of type. In either case, we should produce a reference type with a new type variable rather than an error type so that we can continue inferring the inner patterns without further errors because of the (possible) type mismatch of this pattern.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions