rust-analyzer/crates
Sebastian Ziebell c0e9b57371 Improve assist to filter invalid params
The change updates the logic to determine if a function parameter is
valid for replacing the type param with the trait implementation.

First all usages are determined, to check if they are used outside the function
parameter list. If an outside reference is found, e.g. in body, return type or
where clause, the assist is skipped. All remaining usages only appear in the
function param list. For each usage the param type is checked to see if
it's valid.

**Please note** the logic currently follows a heuristic and may not cover
all existing parameter declarations.

* determine valid usage references by checking ancestors (on AST level)
* split test into separate ones
2023-06-02 12:46:01 +02:00
..
base-db Add diagnostic for _ expressions (typed holes) 2023-05-28 14:55:28 +02:00
cfg Allow setting cfgs 2023-05-28 13:43:21 +02:00
flycheck Wrap platform-specific QoS in r-a-specific “thread intent” 2023-05-28 20:37:38 +10:00
hir Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
hir-def Auto merge of #14941 - Veykril:def-map, r=Veykril 2023-06-01 16:42:12 +00:00
hir-expand Don't add --all-targets to runnables for no-std crates 2023-05-28 14:18:44 +02:00
hir-ty Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
ide Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
ide-assists Improve assist to filter invalid params 2023-06-02 12:46:01 +02:00
ide-completion Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
ide-db Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
ide-diagnostics Auto merge of #14941 - Veykril:def-map, r=Veykril 2023-06-01 16:42:12 +00:00
ide-ssr internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
intern Remove double lookups from Interned 2023-05-24 12:54:25 +02:00
limit Move Expander and LowerCtx into separate modules 2023-04-17 20:44:06 +02:00
mbe Implement ${count()} metavariable expression 2023-05-28 19:54:36 +09:00
parser Recover from leading comma in tuple pat and expr 2023-06-01 08:40:50 +02:00
paths Add AbsPath::absolutize 2023-05-13 11:51:28 +02:00
proc-macro-api Use triomphe Arc 2023-05-02 20:02:43 +03:00
proc-macro-srv Add proof-of-concept QoS implementation 2023-05-20 22:29:32 +10:00
proc-macro-srv-cli Remove proc-macro server command from the rust-analyzer binary 2023-04-26 08:19:28 +02:00
proc-macro-test ⬆️ rust-analyzer 2023-02-13 13:55:14 +02:00
profile internal: Add some additional status ouput 2023-04-22 09:34:47 +02:00
project-model fix: Don't duplicate sysroot crates in rustc workspace 2023-05-31 15:37:35 +02:00
rust-analyzer Auto merge of #14888 - lunacookies:multi-qos, r=Veykril 2023-05-31 10:23:19 +00:00
sourcegen Use retain_mut in CommentBlock::extract 2023-03-31 17:41:40 -04:00
stdx Wrap platform-specific QoS in r-a-specific “thread intent” 2023-05-28 20:37:38 +10:00
syntax Auto merge of #14842 - alibektas:internal/ast-make-improve, r=Veykril 2023-05-30 16:09:46 +00:00
test-utils Render size, align and offset hover values in hex 2023-05-26 16:41:45 +02:00
text-edit Make text-size a workspace dep 2023-05-06 00:49:23 -07:00
toolchain ⬆️ rust-analyzer 2023-03-13 10:42:24 +02:00
tt Emit function bodies in expanding builtin derives 2023-05-03 14:14:47 +03:30
vfs Auto merge of #14755 - poliorcetics:clippy-fixes, r=Veykril 2023-05-24 11:13:52 +00:00
vfs-notify Wrap platform-specific QoS in r-a-specific “thread intent” 2023-05-28 20:37:38 +10:00