rust/crates/ide-assists/src
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
..
handlers Improve assist to filter invalid params 2023-06-02 12:46:01 +02:00
tests Implement assist to replace named generic with impl 2023-05-26 13:13:11 +02:00
utils internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
assist_config.rs feat: add config for inserting must_use in generate_enum_as_method 2022-10-24 13:18:24 +05:30
assist_context.rs Import serde derives on converting json to struct 2022-08-06 20:12:21 +04:30
lib.rs Implement assist to replace named generic with impl 2023-05-26 13:13:11 +02:00
tests.rs Add render configs for memory layout hovers 2023-05-30 18:36:06 +02:00
utils.rs add_missing_impl_members and add_missing_default_members break indentation no longer 2023-05-10 22:27:05 +04:00