11525: fix(assist): Drop generic args in path before insert use in `replace_qualified_name_with_use` r=Veykril a=tysg
Fixes#11505. also removed an unnecessary `clone_for_update` call.
Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
11524: doc: state that only the latest stable toolchain is supported r=lnicola a=jtroo
This closes#11226. The content seemed to make more sense in the
installation section as opposed to the Troubleshooting section.
Co-authored-by: Jan Tache <j.andreitabs@gmail.com>
11490: Correctly fix formatting doc tests with generics r=Veykril a=KarlWithK
Before the doc_test would be outputted like this:
```zsh
"Foo<T, U>::t"
```
However, this would cause problems with shell redirection. I've changed it
so when generics are involved we simply wrap the expression under quotes as so:
```zsh
"\"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
```
Closes https://github.com/rust-analyzer/rust-analyzer/issues/11489
Co-authored-by: KarlWithK <jocelinc60@outlook.com>
Co-authored-by: SeniorMars <jocelinc60@outlook.com>
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>