diff options
author | Florian Diebold <[email protected]> | 2019-12-05 22:02:31 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-06 14:15:26 +0000 |
commit | f86fe3d891ab295e9e394a1338da86524a6205d3 (patch) | |
tree | 891cf4be4893c79598800928e7c0b669d9d2a9c2 /crates/ra_hir_ty/src/infer/pat.rs | |
parent | d2b210a02e3e8ee1cf38909411fa8945aec99f4e (diff) |
Don't unify within a reference
If we are expecting a `&Foo` and get a `&something`, when checking the
`something`, we are *expecting* a `Foo`, but we shouldn't try to unify whatever
we get with that expectation, because it could actually be a `&Foo`, and `&&Foo`
coerces to `&Foo`. So this fixes quite a few false type mismatches.
Diffstat (limited to 'crates/ra_hir_ty/src/infer/pat.rs')
0 files changed, 0 insertions, 0 deletions