diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-05 17:18:02 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-05 17:18:02 +0000 |
commit | 80ab753d7e0bf59b81df317d6ddda43cb919ec83 (patch) | |
tree | 934a7ae2d8b549cd9d5d82a137156c0a71220973 /crates/parser/src/grammar | |
parent | 941f9157f5561868c4683d54fdf98378383f64b8 (diff) | |
parent | 2cf161266941eac300ae66a633ead26f5109ea16 (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/parser/src/grammar')
0 files changed, 0 insertions, 0 deletions