11442: fix(rename): Use text range of a mod name after macro expansion r=Veykril a=tysg
Fixes#11417.
11460: fix: documentation of SsrParams r=Veykril a=nemethf
Fix#11429 by extending the documentation of SsrParms with the
mandatory field 'selections'. Copy its description from lsp_ext.rs.
Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
Co-authored-by: Felicián Németh <felician.nemeth@gmail.com>
11444: feat: Fix up syntax errors in attribute macro inputs to make completion work more often r=flodiebold a=flodiebold
This implements the "fix up syntax nodes" workaround mentioned in #11014. It isn't much more than a proof of concept; I have only implemented a few cases, but it already helps quite a bit.
Some notes:
- I'm not super happy about how much the fixup procedure needs to interact with the syntax node -> token tree conversion code (e.g. needing to share the token map). This could maybe be simplified with some refactoring of that code.
- It would maybe be nice to have the fixup procedure reuse or share information with the parser, though I'm not really sure how much that would actually help.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
11437: [ide_completion] render if a function is async/const/unsafe in completion details r=Veykril a=jhgg
this change renders in the autocomplete detail, whether a function is async/const/unsafe.
i found myself wanting to know this information at a glance, so now it renders here:
![image](https://user-images.githubusercontent.com/5489149/153089518-5419afe4-b2c6-4be8-80f7-585f5c514ff2.png)
Co-authored-by: Jake Heinz <jh@discordapp.com>
In code like this:
```rust
impl<T> Option<T> {
fn as_deref(&self) -> T::Target where T: Deref {}
}
```
when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.
This fixes#11364 (beta apparently switched some bounds around).