7659: Improve "Generate From impl" r=Veykril a=jDomantas
* Allows any field type. Previously it was restricted to path types, but I don't see why it couldn't apply to all other types too. (the main reason for is PR is that I'm too lazy to write out `From<&'static str>` by hand 😄)
* More correct handling for generic enums - previously it wouldn't emit generic params on the impl.
* Also accepts variants with named field.
The impl generation code got mostly copy-pasted from generate_impl assist - please tell if there's an easy way to avoid this duplication.
Co-authored-by: Domantas Jadenkus <djadenkus@gmail.com>
7655: Include a commit log summary in the changelog r=matklad a=lnicola
This version omits any direct pushes, and maybe even pull requests merged from the GitHub UI. But I think it makes writing the release notes easier.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
7358: Refactor reference searching to work with the ast r=matklad a=Veykril
Addresses #4290
This PR is still a bit unpolished. Its main purpose for now is to discuss the direction of the changes as to whether this seems to be the right approach or not. I annotated a few parts with reviews to give a better overwiew without having to read into it too much.
Big part of the diff are test output changes in the `references` module.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
7650: Add `find_impl_block_end` assist helper r=Veykril a=yoshuawuyts
Fixes#7605. This makes it so assists can use helpers to either append a method to the start or the end of an `impl` block. Thanks!
@Veykril if this is merged, perhaps it could be good to update the gif in https://github.com/rust-analyzer/rust-analyzer/pull/7617#issuecomment-776622135 ? -- this should fix the ordering issue when generating multiple methods.
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
7652: Fix slow tests sometimes failing r=flodiebold a=flodiebold
In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.