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
..
2021-02-05 17:18:02 +00:00
2021-02-05 16:57:26 +01:00
2021-01-27 12:39:19 +03:00
2021-02-05 16:04:50 +00:00
2021-01-22 15:38:33 +01:00
2021-02-05 16:57:26 +01:00
2021-01-27 12:39:19 +03:00
.
2021-01-20 01:56:11 +03:00
2021-02-05 16:09:45 +01:00
2021-02-05 02:55:56 +00:00
2021-02-05 16:57:26 +01:00
2021-01-12 18:01:47 +01:00