Better inline preview for postfix completion
Better inline preview for postfix completion, a proper implementation of c5686c8941.
Here editors may filter completion item with the text within `delete_range`, so we need to include the `receiver text` in the `lookup` (aka `FilterText` in LSP spec) for editors to find the completion item. (See https://github.com/rust-lang/rust-analyzer/issues/17036#issuecomment-2056614180, Thanks to [pascalkuthe](https://github.com/pascalkuthe))
fix: Fix inlay hint resolution being broken
So, things broke because we now store a hash (u64) in the resolution payload, but javascript and hence JSON only support integers of up to 53 bits (anything beyond gets truncated in various ways) which caused almost all hashes to always differ when resolving them. This masks the hash to 53 bits to work around that.
Fixes https://github.com/rust-lang/rust-analyzer/issues/16962
fix: VFS should not confuse paths with source roots that have the same prefix
Previously, the VFS would assign paths to the source root that had the longest string prefix match. This would break when we had source roots in subdirectories:
```
/foo
/foo/bar
```
Given a file `/foo/bar_baz.rs`, we would attribute it to the `/foo/bar` source root, which is wrong.
As a result, we would attribute paths to the wrong crate when a crate was in a subdirectory of another one. This is more common in larger monorepos, but could occur in any Rust project.
Fix this in the VFS, and add a test.
Run Windows tests on PRs too
Previously PRs would only do a build on Windows, which confusingly meant that PRs got a green tick for Windows despite not testing them.
See discussion in #17019.
internal: make function builder create ast directly
I am working on #17050.
In the process, I noticed a place in the code that could be refactored.
Currently, the `function builder` creates the `ast` through the `function template` , but those two processes can be combined into one function.
I thought I should work on this first and created a PR.
Document enabling the flatpak rust SDK extension
Just having `org.freedesktop.Sdk.Extension.rust-stable` and `org.freedesktop.Sdk.Extension.llvm15` installed is not enough.
`/usr/lib/sdk/rust-stable/bin` at least needs to be added to the `PATH`.
In the case of VSCodium [ide-flatpak-wrapper](https://github.com/noonsleeper/ide-flatpak-wrapper) in included to do this.
Previously PRs would only do a build on Windows, which confusingly
meant that PRs got a green tick for Windows despite not testing them.
See discussion in #17019.