rust-analyzer/crates
bors[bot] 80ab753d7e
Merge #7572
7572: Add `find_or_create_impl_block` to assist utils r=matklad a=yoshuawuyts

This is another continuation of https://github.com/rust-analyzer/rust-analyzer/pull/7562, introducing a small util to either find an `impl` block, or create a new one if none exists. I copied this code from the `generate_new` assist into https://github.com/rust-analyzer/rust-analyzer/pull/7562, and this unifies both into a helper.

It doesn't feel super polished in its current state, but my hope is that this is enough of a starting point that it can be expanded on later. For example something that would be useful would be a flag which either returns the index of the start of the block, or the end of the block.

Anyway, I hope this is useful. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2021-02-05 17:18:02 +00:00
..
assists Merge #7572 2021-02-05 17:18:02 +00:00
base_db Fix warnings when running cargo doc --document-private-items 2021-01-18 16:44:40 -05:00
cfg Upgrade expect-test to 1.1 2021-01-03 14:43:29 +01:00
completion Make ModPath's representation private 2021-02-04 20:49:24 +01:00
flycheck Make logger-based debugging more pleasant 2021-01-28 17:07:53 +03:00
hir Prefer ValueNS when resolving hir path for PathExpressions 2021-01-29 15:59:52 +01:00
hir_def Remove redundant clones 2021-02-05 16:57:26 +01:00
hir_expand add more counts 2021-01-27 12:39:19 +03:00
hir_ty Merge #7574 2021-02-05 16:04:50 +00:00
ide Increase Highlights highlight range to covering element 2021-02-04 11:37:14 +01:00
ide_db Make ModPath's representation private 2021-02-04 20:49:24 +01:00
mbe Make sure normal dependencies always have version 2021-02-03 12:51:07 +00:00
parser Add validation for mutable const items 2021-01-24 02:17:41 +01:00
paths Document paths items 2021-01-22 15:38:33 +01:00
proc_macro_api Remove redundant clones 2021-02-05 16:57:26 +01:00
proc_macro_srv Use non-deprecated memmap2 crate 2021-02-02 10:25:17 -05:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile add more counts 2021-01-27 12:39:19 +03:00
project_model Async Loading outdir and proc-macro 2021-01-29 01:04:14 +08:00
rust-analyzer Make ModPath's representation private 2021-02-04 20:49:24 +01:00
ssr . 2021-01-20 01:56:11 +03:00
stdx Cleanup decl_check 2021-02-05 16:09:45 +01:00
syntax Merge #7535 2021-02-05 02:55:56 +00:00
test_utils Remove redundant clones 2021-02-05 16:57:26 +01:00
text_edit Avoid turning completion objects into builders 2020-11-16 23:16:41 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt Refactor TokenBuffer for reduc cloning 2021-01-05 02:00:46 +08:00
vfs Document vfs private items 2021-01-12 18:01:47 +01:00
vfs-notify Follow symlinks when walking project trees 2020-10-15 14:22:36 -04:00