10313: Mark large benchmark data files as binary to filter greps r=lnicola a=joshtriplett
When doing a git grep (of rust-analyzer or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the large
benchmark data files, the resulting long single lines can cause a text
pager or editor to slow down and distract from more useful matches.
These test data files aren't formatted for human consumption, so mark
them as binary, which causes git grep to instead just state that they
match without printing the matching "line".
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
When doing a git grep (of rust-analyzer or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the large
benchmark data files, the resulting long single lines can cause a text
pager or editor to slow down and distract from more useful matches.
These test data files aren't formatted for human consumption, so mark
them as binary, which causes git grep to instead just state that they
match without printing the matching "line".
10284: internal: definition based hover functions r=Veykril a=HKalbasi
This is part of #10181 but since it is blocked and `hover.rs` is moving quickly so will cause conflicts, I submitted this PR.
This PR extract some parts of `hover` to `find_definition` (maybe this need to be moved to some other file?) and `hover_for_definition`, with those functions I will be able to calculate definition of every token, and calculate hover (and probably other queries) for each definition only once.
Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
10306: Generate function assist creates bad param names for const/static item args r=XFFXFF a=XFFXFF
Try to fix#10278
Co-authored-by: zhoufan <1247714429@qq.com>
10304: internal: Generate ast nodes for each ast trait r=Veykril a=Veykril
Generate a `DynTrait` node per ast trait that implements the trait itself as well as conversions via the `AstNode` trait. This is a trick already employed in `hir_def::attr` with `AttrsOwner` where it was manually implemented for.
This basically gives us stack trait objects for these(only useful for `hir_def::attr` currently) as well as simple conversions of `SyntaxNode` to a trait, in cases where only a result of a function call of such a trait is of interest.
It doesn't have many uses yet but as its autogenerated it doesn't add any maintenance costs.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
The code here is intentionally dense and does exactly what is written.
Explaining semantic difference between Rust 2015 and 2018 doesn't help
with understanding syntax. Better to just add more targeted tests.
10274: feat: Make inlay hints work in attributed items r=Veykril a=Veykril
Attempt at #10043(previous attempt #10231)
![image](https://user-images.githubusercontent.com/3757771/133887500-091675db-f473-44f8-9bf5-8313ecfbc9e7.png)
Slight difference to the first approach, chaining hints now work but attribute inputs do not as they are basically the same as normal macros in that they take a token tree.
Fixes#10043
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>