rust/crates/ide-assists/src
bors f0e00ed599 Auto merge of #14948 - alibektas:14386, r=Veykril
feature : assist delegate impl

This PR ( fixes #14386 ) introduces a new IDE assist that generates a trait impl for a struct that delegates a field. This is a draft because the current `ide_db::path_transform::PathTransform` produces some unwanted results when it deals with extern crates, an example of which I attach as a GIF.

GIFs :
1. A general case
![14386-functional](https://github.com/rust-lang/rust-analyzer/assets/20956650/22114959-caa6-45ec-a154-b4b2f458f6b1)

2. A case where `ide_db::path_transform::PathTransform` fails to correctly resolve a property ( take `Allocator` as an example ) to its full path, thus causing an error to occur. ( Not to even mention that resolving this causes another error `use of unstable library feature 'allocator_api'` to occur
![14386-erroneous](https://github.com/rust-lang/rust-analyzer/assets/20956650/922ca715-594e-4168-a579-7c5c006f93aa)
2023-06-22 10:44:01 +00:00
..
handlers Auto merge of #14948 - alibektas:14386, r=Veykril 2023-06-22 10:44:01 +00:00
tests Generate delegate trait 2023-06-17 13:52:34 +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 Generate delegate trait 2023-06-17 13:52:34 +02:00
tests.rs Add render configs for memory layout hovers 2023-05-30 18:36:06 +02:00
utils.rs fix(assist): derive source scope from syntax node to be transformed 2023-06-11 15:25:36 +09:00