rust-analyzer/crates
Luiz Carvalho ed216e285d
fix(completion): make the expected type a tad smarter with Fns
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.
2024-01-02 10:28:49 -03:00
..
base-db Auto merge of #16178 - Veykril:builtin-fn-callsite, r=Veykril 2023-12-21 15:22:23 +00:00
cfg Remove Delimiter::DUMMY_INVISIBLE 2023-12-20 14:00:14 +01:00
flycheck internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
hir fix(completion): make the expected type a tad smarter with Fns 2024-01-02 10:28:49 -03:00
hir-def internal: Cleanup Expander a bit 2023-12-22 13:01:13 +01:00
hir-expand fix: Fix SyntaxContextID using incorrect self IDs 2024-01-01 12:54:30 +01:00
hir-ty Auto merge of #16167 - Veykril:dummy-spans, r=Veykril 2023-12-20 13:33:36 +00:00
ide minor: Render more crate information in status command 2024-01-01 13:32:04 +01:00
ide-assists Auto merge of #16112 - roife:rewrite-generate-delete-trait, r=Veykril 2024-01-02 12:30:19 +00:00
ide-completion fix(completion): make the expected type a tad smarter with Fns 2024-01-02 10:28:49 -03:00
ide-db Auto merge of #16112 - roife:rewrite-generate-delete-trait, r=Veykril 2024-01-02 12:30:19 +00:00
ide-diagnostics add test case for negative impl 2023-12-24 20:07:33 +08:00
ide-ssr internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
intern internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
limit Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
load-cargo internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
mbe Auto merge of #16167 - Veykril:dummy-spans, r=Veykril 2023-12-20 13:33:36 +00:00
parser Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
paths Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
proc-macro-api More general server config message for proc-macro-api 2023-12-22 10:35:10 +01:00
proc-macro-srv Special case fixup spans in server::Span impl, they are immutable 2023-12-22 10:13:00 +01:00
proc-macro-srv-cli More general server config message for proc-macro-api 2023-12-22 10:35:10 +01:00
profile Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
project-model Auto merge of #16165 - Veykril:meta-vars, r=Veykril 2023-12-20 10:30:58 +00:00
rust-analyzer Auto merge of #16062 - davidbarsky:david/fix-references-to-removed-settings, r=Veykril 2024-01-02 09:57:48 +00:00
rustc-dependencies Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
sourcegen Don't auto-publish sourcegen 2023-12-18 15:54:01 +02:00
span Special case fixup spans in server::Span impl, they are immutable 2023-12-22 10:13:00 +01:00
stdx Auto merge of #118817 - lnicola:sync-from-ra, r=lnicola 2023-12-12 08:22:37 +00:00
syntax Auto merge of #16112 - roife:rewrite-generate-delete-trait, r=Veykril 2024-01-02 12:30:19 +00:00
test-fixture Try to support pre and post-change metavars 2023-12-19 20:45:12 +01:00
test-utils fix: Fix span marking for builtin fn macros 2023-12-21 16:20:27 +01:00
text-edit Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
toolchain Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00
tt Remove SyntaxContext trait 2023-12-20 14:02:40 +01:00
vfs internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
vfs-notify Merge commit '457b966b17' into sync-from-ra 2023-12-11 11:16:01 +02:00