8745: Support goto_type_definition for types r=matklad a=Veykril
I'm unsure if the approach of lowering an `ast::Type` to a `hir::Type` is a good idea, it seems fine to me at least.
Fixes#2882
Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
8280: Borrow text of immutable syntax node r=iDawer a=iDawer
In https://github.com/rust-analyzer/rowan/pull/101 `rowan::SyntaxNode::green` returns `Cow<'_, GreenNodeData>`. It returns borrow of green node of immutable syntax tree node.
Using this we can return borrowed text from `ast::Name::text`.
~~However now it allocates in case of mutable syntax trees.~~ (see next comment)
The idea comes from https://github.com/rust-analyzer/rowan/pull/100#issuecomment-809330325
Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
8746: Don't store call-site text offsets in hygiene info r=matklad a=jonas-schievink
This threads a lot more database references around in order to avoid storing a bare `TextOffset` in the hygiene info. This `TextOffset` made hygiene info and `ItemTree`s more volatile than they should be, leading to excessive recomputation of `ItemTree`s.
The incremental test added in https://github.com/rust-analyzer/rust-analyzer/pull/8721 is now passing with these changes.
closes https://github.com/rust-analyzer/rust-analyzer/pull/8721
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
8718: 1.52.0 r=SomeoneToIgnore a=matklad
A lot of APIs we use in this release!
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
8742: fix: Do not overwrite comments and attrs in trait impl completion r=Veykril a=Jesse-Bakker
Fixes#8739
Co-authored-by: Jesse Bakker <github@jessebakker.com>
8674: fix for #8664: Emit folding ranges for multi-line where clauses r=matklad a=m5tfi
#8664
I added a test that assert folding multi-line where clauses while leaving single lined one. Please, let me know if the code needs further improvements.
Co-authored-by: m5tfi <72708423+m5tfi@users.noreply.github.com>