Historically, we intentinally violated JSON-RPC spec here by hard
crashing. The idea was to poke both the clients and servers to fix
stuff.
However, this is confusing for server implementors, and falls down in
one important place -- protocol extension are not always backwards
compatible, which causes crashes simply due to version mismatch. We
had once such case with our own extension, and one for semantic
tokens.
So let's be less adventerous and just err on the err side!
6415: Upgrade Chalk to 0.36 r=flodiebold a=flodiebold
Quite a few changes, because Chalk got rid of the `ApplicationTy` nesting.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
6411: remove FIXME after rust 1.47 comes out r=lnicola a=qy3u
Remove 'FIXME' after rust 1.47 comes out. And for compatibility with versions before 1.47, did't remove 'src'.
Co-authored-by: yuqing <yuqing@ipfsforce.com>
6403: docs: Update Neovim nvim-lspconfig repository link r=lnicola a=rockerBOO
`nvim-lsp` updated their repository to `nvim-lspconfig` to lessen confusion about what it does.
Co-authored-by: Dave Lage <rockerboo@gmail.com>
6396: refactor(hir_ty): do not override DisplayTarget in hir_fmt r=flodiebold a=bnjjj
Linked to bug discovery from #6387
The main goal is to not use `display()` method inside `hir_fmt` to not override any parameters (like `DisplayTarget`).
cc @flodiebold
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
6394: Smaller inlay hints r=SomeoneToIgnore a=kjeremy
This makes things a lot more readable but isn't officially supported by vscode: https://github.com/Microsoft/vscode/issues/9078
Inspired by Visual Studio, IntelliJ and Resharper.
Co-authored-by: kjeremy <kjeremy@gmail.com>
6387: do not use associated types placeholder for inlay hint r=flodiebold a=bnjjj
close#6191
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
6384: add doctest runnables on struct r=lnicola a=bnjjj
I will check for how to do the same on trait implementation on another PR.
#6356
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
6376: Avoid impls_fnonce to return true when the trait solving is ambiguous r=flodiebold a=GrayJack
This PR should fix#6375
This adds a variation of `method_resolution::implements_trait` called `method_resolution::implements_trait_unique`, that only returns true when the trait solving is unique, and also change `impls_fnonce` to use the later instead.
I also added a test just to be sure.
Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
6351: Organized completions r=popzxc a=popzxc
This PR continues the work on refactoring of the `completions` crate.
In this episode:
- Actual completions methods are encapsulated into `completions` module, so they aren't mixed with the rest of the code.
- Name duplication was removed (`complete_attribute` => `completions::attribute`, `completion_context` => `context`).
- `Completions` structure was moved from `item` module to the `completions`.
- `presentation` module was removed, as it was basically a module with `impl` for `Completions`.
- Code approaches were a bit unified here and there.
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru>
6367: Handle #![cfg] in crate root r=jonas-schievink a=jonas-schievink
Now we correctly skip analysis of winapi on non-Windows platforms.
bors r+ 🤖
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
6333: Don't interpret type path as part of visibility. r=matklad a=ArifRoktim
This closes#5902.
I only check that the next token isn't equal to `T![:]`, instead of the next two not being equal to `T![::]`. Is that ok?
Co-authored-by: Arif Roktim <arifrroktim@gmail.com>