Daniel Eades
7530d76f00
use pointer args
2023-01-02 14:52:32 +00:00
Ryo Yoshida
19306c070d
Fix tests that depended on loose visibility restriction
2022-11-11 20:31:46 +09:00
feniljain
5bff6c55de
feat: add multiple getters mode in generate_getter
...
This commit adds two modes to generate_getter action.
First, the plain old working on single fields.
Second, working on a selected range of fields.
2022-10-20 16:47:23 +05:30
DropDemBits
d7fb8d51d6
Migrate assists to format args captures, part 2
2022-10-12 02:23:35 -04:00
feniljain
37ff07e1ff
fix(generate_module): generate new impl near its ADT
2022-09-15 19:33:19 +05:30
feniljain
d0f2db3bf4
fix(generate_method): correct method indentation inside generated impl
2022-09-15 17:22:44 +05:30
Dorian Scheidt
48ea3825b8
Introduce and use get_fn_target_info
2022-08-18 18:39:42 -05:00
Dorian Scheidt
d8e7419c64
Generate and use TargetInfo::new
2022-08-18 18:32:35 -05:00
Dorian Scheidt
2e4a4f1a9c
Cleanup inline
2022-08-18 18:28:43 -05:00
Dorian Scheidt
96c04c5e1c
inline assoc_fn_target
2022-08-18 18:28:14 -05:00
Dorian Scheidt
2086c48cff
Remove mut out params via assoc_fn_target_info
2022-08-18 18:26:54 -05:00
Dorian Scheidt
e27af5fae3
Reorder args with flip_comma
2022-08-18 18:21:58 -05:00
Dorian Scheidt
e513d7b504
Replace tuple with TargetInfo struct
2022-08-18 18:20:06 -05:00
Dorian Scheidt
30eabeb95d
extract fn_target_info
2022-08-18 18:14:51 -05:00
Dorian Scheidt
6130860789
use fn_name instead of name_ref.text()
2022-08-18 18:12:53 -05:00
Dorian Scheidt
d39677c1eb
Rename static_method_target -> assoc_fn_target
2022-08-18 18:10:37 -05:00
Dorian Scheidt
39d17efde7
feat: Generate static method using Self::assoc() syntax
...
This change improves the `generate_function` assist to support generating static methods/associated functions using the `Self::assoc()` syntax. Previously, one could generate a static method, but only when specifying the type name directly (like `Foo::assoc()`). After this change, `Self` is supported as well as the type name.
Fixes #13012
2022-08-16 15:37:24 -05:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Lukas Wirth
976d07e53e
fix: Fix unresolved proc macro diagnostics pointing to macro expansions
2022-07-05 12:46:09 +02:00
Amos Wenger
796c4d8a10
Better lowercase/uppercase checks
2022-05-22 18:31:12 +02:00
Amos Wenger
707a5683b1
Still suggest generating enum methods if the name ref starts with a lowercase letter
2022-05-21 01:43:05 +02:00
Amos Wenger
2347da8c8d
Generate enum variant assist
...
This also disables "generate function" when what we clearly want is to
generate an enum variant.
Co-authored-by: Maarten Flippo <maartenflippo@outlook.com>
2022-05-21 01:18:35 +02:00
Peh
1f011fa4a3
style: rename crates to kebab case
2022-05-01 10:48:58 +00:00