about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorLuiz Carvalho <luizcmpc@gmail.com>2023-12-16 11:49:26 -0300
committerLuiz Carvalho <luizcmpc@gmail.com>2024-01-02 10:28:49 -0300
commited216e285d7c0770913cbfc88e2dc4f07f89810f (patch)
tree2538ee43c89fbe32ed7e6b3afc065dc716a2402f /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent34df29620aee42179bdfec13cc221460241f27d4 (diff)
downloadrust-ed216e285d7c0770913cbfc88e2dc4f07f89810f.tar.gz
rust-ed216e285d7c0770913cbfc88e2dc4f07f89810f.zip
fix(completion): make the expected type a tad smarter with `Fn`s
This commit changes how the expected type is calculated when working
with Fn pointers, making the parenthesis stop vanishing when completing
the function name.

I've been bugged by the behaviour on parenthesis completion for a long
while now. R-a assumes that the `LetStmt` type is the same as the
function type I've just written. Worse is that all parenthesis vanish,
even from functions that have completely different signatures. It will
now verify if the signature is the same.

While working on this, I noticed that record fields behave the same, so
I also made it prioritize the field type instead of the current
expression when possible, but I'm unsure if this is OK, so input is
appreciated.

ImplTraits as return types will still behave weirdly because lowering is
disallowed at the time it resolves the function types.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions