Commit Graph

13426 Commits

Author SHA1 Message Date
Pavan Kumar Sunkara
c070146a83
Update Cargo.toml 2020-10-31 08:49:57 +01:00
bors[bot]
dd84b7a24d
Merge #6416
6416: Respond with JSON-RPC error if we failed to deserialize request r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-10-30 19:07:29 +00:00
Aleksey Kladov
3b9548e163 Respond with JSON-RPC error if we failed to deserialize request
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!
2020-10-30 19:57:52 +01:00
bors[bot]
590fdba284
Merge #6415
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>
2020-10-30 18:22:03 +00:00
Florian Diebold
bca51e3519 Upgrade Chalk to 0.36
Quite a few changes, because Chalk got rid of the `ApplicationTy` nesting.
2020-10-30 18:57:55 +01:00
bors[bot]
e7c8c600b7
Merge #6411
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>
2020-10-30 07:10:31 +00:00
yuqing
6c4bb30e95 remove FIXME after rust 1.47 comes out 2020-10-30 14:58:59 +08:00
bors[bot]
1b7e350e80
Merge #6403
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>
2020-10-29 15:16:22 +00:00
Dave Lage
e6419350de
docs: Update Neovim nvim-lspconfig repository link 2020-10-29 11:08:12 -04:00
Lukas Wirth
042413c35f Keep generic annotations when qualifying things 2020-10-29 10:25:15 +01:00
bors[bot]
173e971e82
Merge #6398
6398: cargo update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-10-28 19:38:57 +00:00
kjeremy
e7e58b08ac cargo update 2020-10-28 15:37:40 -04:00
bors[bot]
e77ac8d79c
Merge #6396
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>
2020-10-28 17:06:25 +00:00
Benjamin Coenen
7322a69cf6 refactor(hir_ty): do not override DisplayTarget in hir_fmt
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 17:58:16 +01:00
bors[bot]
93fca7556a
Merge #6394
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>
2020-10-28 15:00:25 +00:00
bors[bot]
e34183218c
Merge #6387
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>
2020-10-28 14:54:00 +00:00
Benjamin Coenen
ec3638adb9 do not use associated types placeholder for inlay hint
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 15:42:51 +01:00
Benjamin Coenen
0aca7b78de do not use associated types placeholder for inlay hint
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 15:23:23 +01:00
kjeremy
77ffe137f2 Smaller inlay hints
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.
2020-10-28 09:52:23 -04:00
bors[bot]
85cda15b62
Merge #6384
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>
2020-10-28 13:15:28 +00:00
Benjamin Coenen
ef2f7bb243 do not use associated types placeholder for inlay hint
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 14:07:12 +01:00
Matthew Sanetra
05723cb50d Add check if param name is similar to fn name 2020-10-28 14:45:45 +02:00
bors[bot]
a9b60b8478
Merge #6392
6392: Also set textDecoration: none on inlay hints r=SomeoneToIgnore a=lnicola

Closes #6380

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-10-28 12:36:51 +00:00
Laurențiu Nicola
91b4dd63b0 Also set textDecoration: none on inlay hints 2020-10-28 13:49:38 +02:00
Benjamin Coenen
8762b797fd do not use associated types placeholder for inlay hint
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 11:20:05 +01:00
Benjamin Coenen
73161cc9cd do not use associated types placeholder for inlay hint #6191
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-27 20:23:09 +01:00
bors[bot]
53c7aead8f
Merge #6379
6379: Highlight never type as BuiltinType r=matklad a=Veykril

Fixes #6374

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-27 14:49:37 +00:00
bors[bot]
3f20d344cd
Merge #6382
6382: Set font-wieght: normal on inlay hints r=SomeoneToIgnore a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-10-27 14:31:28 +00:00
bors[bot]
a03f004766
Merge #6383
6383: Update client install command in dev docs r=kjeremy a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-10-27 13:54:39 +00:00
Benjamin Coenen
3bbc2e95e4 add doctest runnables on struct #6356
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-27 14:11:27 +01:00
bors[bot]
8cfc1cd95b
Merge #6376
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>
2020-10-27 09:51:49 +00:00
Benjamin Coenen
94b2330f55 add doctest runnables on struct #6356
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-27 10:07:33 +01:00
Laurențiu Nicola
f94d0252b3 Update client install command in dev docs 2020-10-27 09:49:57 +02:00
Laurențiu Nicola
8a5a5b2477 Set font-wieght: normal on inlay hints 2020-10-27 09:18:25 +02:00
bors[bot]
7f346f9ae1
Merge #6257
6257: Don't suggest extracting out 1-tuple enum variants r=matklad a=repnop

Fixes #6241.

Co-authored-by: Wesley Norris <repnop@outlook.com>
2020-10-26 21:40:56 +00:00
Wesley Norris
b9790a23bf Don't suggest extracting out 1-tuple enum variants
Fixes #6241.
2020-10-26 17:38:23 -04:00
Lukas Wirth
269e67312d Highlight never type as BuiltinType 2020-10-26 22:27:30 +01:00
bors[bot]
db2c379bae
Merge #6378
6378: Better ordering of assists r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-10-26 21:06:15 +00:00
Aleksey Kladov
b2ccef60b4 Better ordering of assists 2020-10-26 21:59:28 +01:00
GrayJack
ae6376d74c
Fix test 2020-10-26 17:23:29 -03:00
bors[bot]
d10e2a04c8
Merge #6351
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>
2020-10-26 19:06:34 +00:00
GrayJack
40a875ab7a
Add test to avoid regression 2020-10-26 15:28:56 -03:00
GrayJack
08e95a5dc1
Fix case where non FnOnce variables is marked callable 2020-10-26 15:20:33 -03:00
Igor Aleksanov
357bf0cedc Reduce visibility of some methods 2020-10-26 20:37:19 +03:00
bors[bot]
d01e412eb1
Merge #6367
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>
2020-10-26 15:05:10 +00:00
Jonas Schievink
cd3c632cfc Handle #![cfg] in crate root 2020-10-26 16:04:08 +01:00
Lukas Wirth
750ab54573 Do insertion lookahead in algo::diff 2020-10-26 16:03:37 +01:00
bors[bot]
42df7cc0c8
Merge #6313
6313: Latest proposed LSP 3.16.0 and refresh semantic tokens r=matklad a=kjeremy

Needs: https://github.com/gluon-lang/lsp-types/pull/183

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2020-10-26 14:49:07 +00:00
bors[bot]
a0f1346864
Merge #6333
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>
2020-10-26 14:34:00 +00:00
bors[bot]
1a84cadc88
Merge #6347
6347: Support insertion in SyntaxRewriter r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-10-26 14:08:47 +00:00