11481: Display parameter names when hovering over a function pointer r=Veykril a=Vannevelj
Implements #11474
The idea is pretty straightforward: previously we constructed the hover based on just the parameter types, now we pass in the parameter names as well. I went for a quick-hit approach here but I expect someone will be able to point me to a better way of resolving the identifier.
I haven't figured out yet how to actually run my rust-analyzer locally so I can see it in action but the unit test indicates it should work.
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
11424: Pass required features to cargo when using run action r=Veykril a=WaffleLapkin
When using `F1`->`Rust Analyzer: Run` action on an `example`, pass its `required-features` to `cargo run`. This allows to run examples that were otherwise impossible to run with RA.
Co-authored-by: Maybe Waffle <waffle.lapkin@gmail.com>
11511: internal: Wrap MacroCallKind::Attr attr_args field in an Arc r=Veykril a=Veykril
This is stored in `MacroCallLoc` which is returned from a query, so cloning should be made cheap.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
11504: Fix a typo in server_capabilities.experimental r=lnicola a=nemethf
Commit 27c4be6b4f wasn't really complex, but I still managed to make a mistake there, which this PR fixes. Sorry.
Co-authored-by: Felicián Németh <felician.nemeth@gmail.com>
Before the doc_test would be outputted like this:
"Foo<T, U>::t"
However, this would cause shells with shell redirection. I've changed it
so when generics are involved we simply wrap the expression under escape
chanters as so:
"\"Foo<T, U>::t\""
Note:
At the cost of adding this, I had to allocate a new string via
format!{}. However, I argue this is alright as this for just for
outputting the name of the doc test.
The following tests have been changed:
runnables::tests::doc_test_type_params
runnables::tests::test_doc_runnables_impl_mod
runnables::tests::test_runnables_doc_test_in_impl
11484: Infer the array size for slice patterns r=flodiebold a=ChayimFriedman2
Fixes#11478 (feat or fix?),
I don't know much about the type-checking in RA, so maybe I did some obvious mistake.
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
11480: fix: keyword hover works on non-keyword tokens if expanded to keyword r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>