aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt/src
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-03-10 19:56:26 +0000
committerFlorian Diebold <[email protected]>2020-03-10 20:02:13 +0000
commitadc7b8ea2d0ff1dafecaa697638825463f4b8891 (patch)
tree75665c712625782d88e03447fcd10245c903d6f8 /crates/ra_fmt/src
parente5df8c402847d5bedb8ebcb621aac46dbe215cdd (diff)
Fix completion with a partially unknown type
To test whether the receiver type matches for the impl, we unify the given self type (in this case `HashSet<{unknown}>`) with the self type of the impl (`HashSet<?0>`), but if the given self type contains Unknowns, they won't be unified with the variables in those places. So we got a receiver type that was different from the expected one, and concluded the impl doesn't match. The fix is slightly hacky; if after the unification, our variables are still there, we make them fall back to Unknown. This does make some sense though, since we don't want to 'leak' the variables. Fixes #3547.
Diffstat (limited to 'crates/ra_fmt/src')
0 files changed, 0 insertions, 0 deletions