Commit Graph

6138 Commits

Author SHA1 Message Date
Jonas Schievink
15233a467d ? 2020-04-30 00:10:30 +02:00
Jonas Schievink
cafa7a780a Use or-patterns more 2020-04-30 00:10:30 +02:00
Jonas Schievink
3e41483932 Remove .clone() 2020-04-30 00:10:30 +02:00
Jonas Schievink
3cb73da949 Rename to associated_type_shorthand_candidates 2020-04-30 00:10:30 +02:00
Jonas Schievink
8c2670026a Complete assoc. items on type parameters 2020-04-30 00:10:30 +02:00
bors[bot]
1cde354c35
Merge #4119
4119: Cache proc-macro dlls r=matklad a=edwin0cheng

This PR try to fix a deadlock in proc-macro srv by not unloading dlls.

Currently we load and unload dlls for each request, however rustc TLS is leaky , such that if we do it a lot of times, all TLS index will be consumed and it will be deadlocked inside panic (it is because panic itself is using TLS too).


Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-29 13:28:57 +00:00
Aleksey Kladov
b4dd475257 More principled approach for finding From trait 2020-04-29 14:51:44 +02:00
bors[bot]
c3dfeba165
Merge #4204
4204: Use specific pattern when translating if-let-else to match r=matklad a=matklad

We *probably* should actually use the same machinery here, as we do
for fill match arms, but just special-casing options and results seems
to be a good first step.



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-29 10:01:26 +00:00
Aleksey Kladov
7c3c289dab Use specific pattern when translating if-let-else to match
We *probably* should actually use the same machinery here, as we do
for fill match arms, but just special-casing options and results seems
to be a good first step.
2020-04-29 11:59:11 +02:00
Aleksey Kladov
041aea2263 Better filtering of qualified enum variants in completion 2020-04-29 11:26:21 +02:00
Aleksey Kladov
73bef854ab Move shared assist code to utils 2020-04-29 10:38:51 +02:00
Jonas Schievink
8cb139090f Complete union fields after dot 2020-04-28 22:45:46 +02:00
bors[bot]
07f690ddf6
Merge #4161
4161: lsp-types 0.74 r=kjeremy a=kjeremy

* Fixes a bunch of param types to take partial progress into account.
* Will allow us to support insert/replace text in completions

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-04-28 20:12:44 +00:00
bors[bot]
db441de0a8
Merge #4193
4193: Make it impossible to forget to add a semantic token type / modifier r=kjeremy a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-28 20:05:08 +00:00
bors[bot]
2096db90b4
Merge #4184
4184: Treat comments beginning with four slashes as regular line comments r=kjeremy a=adamrk

Addresses https://github.com/rust-analyzer/rust-analyzer/issues/4040

Co-authored-by: adamrk <ark.email@gmail.com>
2020-04-28 19:57:23 +00:00
adamrk
0bd7d81805 Fix comment prefix method for four slash comments 2020-04-28 21:13:37 +02:00
bors[bot]
9230ae5492
Merge #4148
4148: Simplify profiler impl (bubble up Option) r=matklad a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-28 18:44:34 +00:00
Aleksey Kladov
890938a48c Make it impossible to forget to add a semantic token type / modifier 2020-04-28 17:14:05 +02:00
Leander Tentrup
052e9faa90 Introduce new semantic highlight token for format specifier 2020-04-28 11:13:12 +02:00
adamrk
b6560e3ebb Treat comments beginning with four slashes as regular line comments 2020-04-28 10:23:45 +02:00
bors[bot]
da1f316b02
Merge #4173
4173: Use core instead of std for builtin derive macros r=edwin0cheng a=edwin0cheng

Fixed #4087.

We can't use `$crate` here right now because : 

1. We have to able to detect `macro` 2.0 in collecting phase for finding `rustc_builtin_macro` attrs.
2. And we have to make hygiene works for builtin derive macro.

r= @flodiebold 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-27 20:12:27 +00:00
Edwin Cheng
c69f9c1b0a Check dep name to detect it is core 2020-04-28 04:11:24 +08:00
Edwin Cheng
6d3b0af900 Use empty-deps tricks to detect it is core 2020-04-28 03:32:47 +08:00
Edwin Cheng
213d208e2d Add test 2020-04-28 02:10:17 +08:00
Edwin Cheng
6a5014329a Use core instead of std for builtin derive macros 2020-04-28 01:48:55 +08:00
kjeremy
61f1c0a990 lsp-types 0.74
* Fixes a bunch of param types to take partial progress into account.
* Will allow us to support insert/replace text in completions
2020-04-26 16:05:22 -04:00
Florian Diebold
497073abc6 For associated type shorthand (T::Item), use the substs from the where clause
So e.g. if we have `fn foo<T: SomeTrait<u32>>() -> T::Item`, we want to lower
that to `<T as SomeTrait<u32>>::Item` and not `<T as SomeTrait<_>>::Item`.
2020-04-26 16:58:08 +02:00
Edwin Cheng
bfce657377 Generate uniq name 2020-04-26 18:59:09 +08:00
Edwin Cheng
183673655f Simpify code 2020-04-26 17:58:56 +08:00
Edwin Cheng
fb996cae6b Fix 2020-04-26 17:17:37 +08:00
Edwin Cheng
3bad5587c8 Compare timestamp 2020-04-26 17:17:37 +08:00
Edwin Cheng
5a5bba5a46 Copy dylib to temp directory 2020-04-26 17:17:37 +08:00
Edwin Cheng
3e24444aee Cacheproc-macro dlls 2020-04-26 17:17:37 +08:00
bors[bot]
ef67e0a497
Merge #4155
4155: Precompute expected type during completion r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-26 08:54:42 +00:00
Aleksey Kladov
05cdc87158 Precompute expected type during completion 2020-04-26 10:54:08 +02:00
Aleksey Kladov
5ef0f44499 Add cargo test to the list of Run commands 2020-04-26 10:40:34 +02:00
veetaha
24d18d92f6 Simplify profiler impl (bubble up Option and shorten code 2020-04-26 00:55:49 +03:00
Jonas Schievink
5a355ff52b Fix broken test 2020-04-25 22:23:56 +02:00
Jonas Schievink
76d6f54471 Don't add call parens when an fn type is expected 2020-04-25 22:18:57 +02:00
bors[bot]
45832b990c
Merge #4145
4145: Remove dead code r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-25 19:30:04 +00:00
bors[bot]
7021352dc2
Merge #4113 #4136 #4141 #4142
4113: Support returning non-hierarchical symbols r=matklad a=kjeremy

If `hierarchicalDocumentSymbolSupport` is not true in the client capabilites
then it does not support the `DocumentSymbol[]` return type from the
`textDocument/documentSymbol` request and we must fall back to `SymbolInformation[]`.

This is one of the few requests that use the client capabilities to
differentiate between return types and could cause problems for clients.

See https://github.com/microsoft/language-server-protocol/pull/538#issuecomment-442510767 for more context.

Found while looking at #144

4136: add support for cfg feature attributes on expression #4063 r=matklad a=bnjjj

close issue #4063

4141: Fix typo r=matklad a=Veetaha



4142: Remove unnecessary async from vscode language client creation r=matklad a=Veetaha



Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-25 19:23:15 +00:00
Aleksey Kladov
bd9ede0ec9 Extract messy tree handling out of profiling code 2020-04-25 21:22:40 +02:00
Aleksey Kladov
0f099ead88 Fix panic in NoSuchField diagnostic 2020-04-25 21:09:33 +02:00
Aleksey Kladov
95b989ec30 Simplify 2020-04-25 19:50:42 +02:00
veetaha
f52e2f6840 Fix typo 2020-04-25 20:49:51 +03:00
Aleksey Kladov
726938f598 Simplify hprof 2020-04-25 19:30:00 +02:00
Aleksey Kladov
b3e9f3d143 Move hprof to a separate file 2020-04-25 19:30:00 +02:00
Aleksey Kladov
7623db1106 minor clenup 2020-04-25 19:30:00 +02:00
bors[bot]
5671bacfa6
Merge #4139
4139: Add check for rules that no repetition which could match an empty token r=matklad a=edwin0cheng

Fix #4103

for `/ui/issues/issue-57597.rs`

This is `ParseError` of the macro rules , because it is how rustc handle it : 

a58b1ed44f/src/librustc_expand/mbe/macro_rules.rs (L558)


Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-25 16:26:51 +00:00
bors[bot]
67afeebaf5
Merge #4137
4137: Prefer core/alloc paths on #![no_std] r=matklad a=jonas-schievink



Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-04-25 16:19:21 +00:00