Commit Graph

17126 Commits

Author SHA1 Message Date
bors[bot]
31a19148e9
Merge #8962
8962: internal: try re-enabling debug info on releases again r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-24 11:52:09 +00:00
Aleksey Kladov
3ea62568ba internal: try re-enabling debug info on releases again
full LTO OOMs the LLVM, lets try thin

cc https://github.com/rust-lang/rust/issues/85598
2021-05-24 14:41:31 +03:00
bors[bot]
ca19c63f20
Merge #8959
8959: fix: can download server binary on windows again r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-24 08:53:55 +00:00
Aleksey Kladov
df146341c5 fix: can download server binary on windows again
Closes #8956

See https://github.com/rust-analyzer/rust-analyzer/pull/8951#issuecomment-846716999
2021-05-24 11:52:25 +03:00
bors[bot]
495c9586ec
Merge #8945
8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold

Also makes call info show the correct types for generic methods.

![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png)
![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png)


Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 21:55:51 +00:00
Florian Diebold
b8262099cc Get rid of field_type again 2021-05-23 23:54:35 +02:00
bors[bot]
a2ce091fd7
Merge #8953
8953: feat: generate getter avoids generating types like `&Vec<T>` r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 21:17:20 +00:00
Aleksey Kladov
479a7387c2 feat: generate getter avoids generating types like &Vec<T> 2021-05-24 00:15:23 +03:00
bors[bot]
4e376ba3ce
Merge #8954
8954: internal: document ItemTree design r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-23 21:10:37 +00:00
Jonas Schievink
693325fc39 internal: document ItemTree design 2021-05-23 23:09:38 +02:00
bors[bot]
951c0e95f4
Merge #8948
8948: feat: generate getter assist places the cursor at the generated function r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 20:48:35 +00:00
Aleksey Kladov
8696c82777 feat: generate getter assist places the cursor at the generated function 2021-05-23 23:43:33 +03:00
bors[bot]
e0864c9c15
Merge #8950
8950: minor: align import style with styleguide r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 20:40:39 +00:00
Aleksey Kladov
8d5f59e0f1 minor: align import style with styleguide 2021-05-23 23:40:19 +03:00
Aleksey Kladov
a6633a88a8 fix: reveal snippets 2021-05-23 23:40:19 +03:00
Aleksey Kladov
af54b1e248 minimize tests 2021-05-23 23:19:00 +03:00
Aleksey Kladov
c06599504b remove duplicate tests 2021-05-23 23:15:54 +03:00
Aleksey Kladov
4c8259e210 reduce duplication 2021-05-23 23:13:35 +03:00
bors[bot]
1605488710
Merge #8947
8947: Correctly resolve crate name in use paths when import shadows it r=Veykril a=Veykril

Fixes #7763
bors r+

Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
2021-05-23 17:37:36 +00:00
Lukas Tobias Wirth
da74c66947 Correctly resolve crate name in use paths when import shadows itself 2021-05-23 19:37:01 +02:00
bors[bot]
f04daf693a
Merge #8946
8946: Minor: fix comment style r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 16:51:09 +00:00
Aleksey Kladov
7283163bb9 Minor: fix comment style
See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#documentation
2021-05-23 19:50:23 +03:00
Florian Diebold
e65803748d Infer correct expected type in closure
Sadly currently only works if the closure body isn't completely missing.
2021-05-23 18:45:44 +02:00
Florian Diebold
7a0c93c58a Infer correct expected type for generic struct fields 2021-05-23 18:45:44 +02:00
Florian Diebold
4a6cdd776d Record method call substs and use them in call info 2021-05-23 18:24:21 +02:00
bors[bot]
96e5412f88
Merge #8944
8944: minor: explain why nested `TypeRef` aren't interned r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-23 14:29:18 +00:00
Jonas Schievink
11825ac5fe Explain why nested TypeRef aren't interned 2021-05-23 16:28:23 +02:00
bors[bot]
064ff633f6
Merge #8940
8940: Give ‘unsafe’ semantic token modifier to unsafe traits r=Veykril a=arzg

Hi! This is my first pull request that touches rust-analyzer itself beyond a search-and-replace, so please tell me if I should change anything or do anything differently. :)

Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-05-23 12:40:14 +00:00
Aramis Razzaghipour
4d4dbcfead
Give ‘unsafe’ semantic token modifier to unsafe traits 2021-05-23 21:45:10 +10:00
bors[bot]
57eedd9066
Merge #8936 #8939
8936: fix: Improve nightly downloads with better local state management r=matklad a=SomeoneToIgnore

When any nightly is downloaded, we store its GitHub release id in the local cache and never invalidate that cache.

Due to this, it was possible to do the following sequence:
* have the nightly locally
* downgrade the extension to any stable version
* observe that despite the `"rust-analyzer.updates.channel": "nightly",` setting, no nightly updates are happening
* on the next day, the actual update happens (given the new nightly is released)

Since it's impossible to install nightly version directly through the VSCode marketplace, any fiddling with dev version results in the same situation: one have to wait for the next nightly release to happen in order to restore the nightly.

This PR 
* invalidates the cache eagerly during bootstrap if the current plugin is not nightly
* enforces the release id check for nightly versions only
* fixes the `ctx.globalStoragePath` deprecated API usage

Hopefully, it also helps mysterious non-updated plugins that we encounter from time to time, but hard to tell for sure.

8939: internal: disable debug symbols due to failing windows build r=matklad a=matklad

bors r+
🤖

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-23 11:12:45 +00:00
Aleksey Kladov
9f9c4bf3de internal: disable debug symbols due to failing windows build
See https://github.com/rust-lang/rust/issues/85598
2021-05-23 14:06:25 +03:00
bors[bot]
0ec4ce1e9b
Merge #8938
8938: internal: Fix #8931 r=flodiebold a=flodiebold

  - and add some better checking for similar bugs

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 11:03:18 +00:00
Florian Diebold
34a3bc4196 Paper over #8931 a bit more
The problem was the skipping of binders in
`resolve_method_call_as_callable`; this still doesn't use the _correct_
substitution, but at least it doesn't return a type with free variables
in it.

Fixes #8931.
2021-05-23 13:00:14 +02:00
Kirill Bulatov
daedcc2b77 More style fixes 2021-05-23 13:57:04 +03:00
Florian Diebold
a5d85a6356 Add test for #8931 and better checking 2021-05-23 12:52:41 +02:00
Kirill Bulatov
223dbd2187 Style fix 2021-05-23 13:43:06 +03:00
Kirill Bulatov
95c51d8f1d Don't use a deprecated accessor 2021-05-23 11:54:03 +03:00
Kirill Bulatov
230ed3304a Better releaseId naming 2021-05-23 11:51:35 +03:00
Kirill Bulatov
be3e997ddf Remove nightly release id from local storage for stable extensions 2021-05-23 11:49:34 +03:00
Kirill Bulatov
b8635a8e60 Download nightly extension when configured and run from stable extension version 2021-05-23 11:28:06 +03:00
bors[bot]
808ebe4b86
Merge #8935
8935: docs(manual): Add rust-tools.nvim to nvim-lsp r=matklad a=simrat39

I'm not sure what to write there but this seems fine
https://github.com/simrat39/rust-tools.nvim/issues/16

Co-authored-by: sim <simrats169169@gmail.com>
2021-05-23 07:33:24 +00:00
sim
fe93c114e3
docs(manual): Add rust-tools.nvim to nvim-lsp 2021-05-22 21:17:40 -07:00
bors[bot]
e4722b6492
Merge #8932
8932: internal: even prettier itemtrees r=jonas-schievink a=jonas-schievink

Extends the ItemTree pretty printer to handle all `Path`s, and to print generic parameters and where-clauses.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-23 01:00:33 +00:00
Jonas Schievink
15ff7faf3d Render where clauses and more generic params 2021-05-23 02:51:58 +02:00
Jonas Schievink
380293d6c2 Pretty-print generic parameters 2021-05-23 01:15:26 +02:00
Jonas Schievink
c22ccd07fe ItemTree: pretty-print all paths 2021-05-23 00:37:15 +02:00
bors[bot]
bc1ba1549d
Merge #8926
8926: internal: Drop uncompressed release artifacts and those following the old naming convention r=matklad a=lnicola

Closes #6996

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-22 18:35:02 +00:00
bors[bot]
787caa3f24
Merge #8927
8927: internal: try enabling debug info for releases r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-22 18:21:02 +00:00
Aleksey Kladov
db393982ca internal: try enabling debug info for releases
We now compress releases, so let's check  if debug info is light enough
to actually ship to users. Getting line numbers back would be helpful!
2021-05-22 21:19:48 +03:00
Laurențiu Nicola
7ff972f0ce Drop uncompressed release artifacts and those following the old naming convention 2021-05-22 20:26:29 +03:00