aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Cacheproc-macro dllsEdwin Cheng2020-04-264-58/+70
| | | | |
* | | | | More principled approach for finding From traitAleksey Kladov2020-04-294-39/+95
| | | | |
* | | | | Merge #4204bors[bot]2020-04-294-54/+144
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * | | | | Use specific pattern when translating if-let-else to matchAleksey Kladov2020-04-294-20/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Move shared assist code to utilsAleksey Kladov2020-04-293-48/+35
| | | | | |
* | | | | | Better filtering of qualified enum variants in completionAleksey Kladov2020-04-292-9/+49
|/ / / / /
* | | | | Complete union fields after dotJonas Schievink2020-04-282-12/+53
| | | | |
* | | | | Merge #4161bors[bot]2020-04-286-43/+54
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * | | | | lsp-types 0.74kjeremy2020-04-266-43/+54
| | |/ / / | |/| | | | | | | | | | | | | | | | | | * Fixes a bunch of param types to take partial progress into account. * Will allow us to support insert/replace text in completions
* | | | | Merge #4193bors[bot]2020-04-281-56/+61
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4193: Make it impossible to forget to add a semantic token type / modifier r=kjeremy a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Make it impossible to forget to add a semantic token type / modifierAleksey Kladov2020-04-281-56/+61
| | |_|/ / | |/| | |
* | | | | Merge #4184bors[bot]2020-04-282-10/+22
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * | | | | Fix comment prefix method for four slash commentsadamrk2020-04-281-10/+6
| | | | | |
| * | | | | Treat comments beginning with four slashes as regular line commentsadamrk2020-04-282-0/+16
| | | | | |
* | | | | | Merge #4148bors[bot]2020-04-281-24/+21
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4148: Simplify profiler impl (bubble up Option) r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * | | | | Simplify profiler impl (bubble up Option and shorten codeveetaha2020-04-251-24/+21
| | | | | |
* | | | | | Introduce new semantic highlight token for format specifierLeander Tentrup2020-04-289-37/+48
| |/ / / / |/| | | |
* | | | | Merge #4173bors[bot]2020-04-272-37/+109
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * | | | Check dep name to detect it is coreEdwin Cheng2020-04-271-4/+6
| | | | |
| * | | | Use empty-deps tricks to detect it is coreEdwin Cheng2020-04-272-11/+26
| | | | |
| * | | | Add testEdwin Cheng2020-04-272-1/+27
| | | | |
| * | | | Use core instead of std for builtin derive macrosEdwin Cheng2020-04-272-36/+65
| | |/ / | |/| |
* / | | For associated type shorthand (T::Item), use the substs from the where clauseFlorian Diebold2020-04-264-13/+119
|/ / / | | | | | | | | | | | | 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`.
* | | Merge #4155bors[bot]2020-04-263-35/+44
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4155: Precompute expected type during completion r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Precompute expected type during completionAleksey Kladov2020-04-263-35/+44
| |/ /
* / / Add `cargo test` to the list of Run commandsAleksey Kladov2020-04-263-62/+63
|/ /
* | Fix broken testJonas Schievink2020-04-251-1/+1
| |
* | Don't add call parens when an fn type is expectedJonas Schievink2020-04-252-0/+63
| |
* | Merge #4145bors[bot]2020-04-257-398/+345
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4145: Remove dead code r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Extract messy tree handling out of profiling codeAleksey Kladov2020-04-255-150/+118
| | |
| * | Fix panic in NoSuchField diagnosticAleksey Kladov2020-04-251-3/+2
| | |
| * | SimplifyAleksey Kladov2020-04-251-20/+17
| | |
| * | Simplify hprofAleksey Kladov2020-04-251-85/+64
| | |
| * | Move hprof to a separate fileAleksey Kladov2020-04-252-393/+398
| | |
| * | minor clenupAleksey Kladov2020-04-252-16/+15
| |/
| |
| \
| \
| \
| \
| \
*-----. \ Merge #4113 #4136 #4141 #4142bors[bot]2020-04-255-5/+76
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Co-authored-by: Benjamin Coenen <[email protected]> Co-authored-by: veetaha <[email protected]>
| | | * | Fix typoveetaha2020-04-251-1/+1
| | | |/
| | * | add support for cfg feature attributes on expression #4063Benjamin Coenen2020-04-252-0/+36
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | Support returning non-hierarchical symbolskjeremy2020-04-241-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Add hierarchical symbols client capabilitykjeremy2020-04-241-0/+6
| | | |
* | | | Merge #4139bors[bot]2020-04-252-12/+75
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 : https://github.com/rust-lang/rust/blob/a58b1ed44f5e06976de2bdc4d7dc81c36a96934f/src/librustc_expand/mbe/macro_rules.rs#L558 Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Checks no repetition for an empty tokenEdwin Cheng2020-04-252-12/+75
| | | | |
* | | | | Merge #4137bors[bot]2020-04-252-14/+87
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4137: Prefer core/alloc paths on #![no_std] r=matklad a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Prefer core/alloc paths on #![no_std]Jonas Schievink2020-04-252-14/+87
| | |_|/ | |/| |
* | | | Merge #4133bors[bot]2020-04-252-11/+10
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4133: main: eagerly prime goto-definition caches r=matklad a=BurntSushi This commit eagerly primes the caches used by goto-definition by submitting a "phantom" goto-definition request. This is perhaps a bit circuitous, but it does actually get the job done. The result of this change is that once RA is finished its initial loading of a project, goto-definition requests are instant. There don't appear to be any more surprise latency spikes. This _partially_ addresses #1650 in that it front-loads the latency of the first goto-definition request, which in turn makes it more predictable and less surprising. In particular, this addresses the use case where one opens the text editor, starts reading code for a while, and only later issues the first goto-definition request. Before this PR, that first goto-definition request is guaranteed to have high latency in any reasonably sized project. But after this PR, there's a good chance that it will now be instant. What this _doesn't_ address is that initial loading time. In fact, it makes it longer by adding a phantom goto-definition request to the initial startup sequence. However, I observed that while this did make initial loading slower, it was overall a somewhat small (but not insignificant) fraction of initial loading time. ----- At least, the above is what I _want_ to do. The actual change in this PR is just a proof-of-concept. I came up with after an evening of printf-debugging. Once I found the spot where this cache priming should go, I was unsure of how to generate a phantom input. So I just took an input I knew worked from my printf-debugging and hacked it in. Obviously, what I'd like to do is make this more general such that it will always work. I don't know whether this is the "right" approach or not. My guess is that there is perhaps a cleaner solution that more directly primes whatever cache is being lazily populated rather than fudging the issue with a phantom goto-definition request. I created this as a draft PR because I'd really like help making this general. I think whether y'all want to accept this patch is perhaps a separate question. IMO, it seems like a good idea, but to be honest, I'm happy to maintain this patch on my own since it's so trivial. But I would like to generalize it so that it will work in any project. My thinking is that all I really need to do is find a file and a token somewhere in the loaded project, and then use that as input. But I don't quite know how to connect all the data structures to do that. Any help would be appreciated! cc @matklad since I've been a worm in your ear about this problem. :-) Co-authored-by: Andrew Gallant <[email protected]>
| * | | main: fix bug where thread pool isn't joinedAndrew Gallant2020-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | Pointed out here: https://github.com/rust-analyzer/rust-analyzer/pull/4133#issuecomment-619386272
| * | | main: eagerly prime goto-definition cachesAndrew Gallant2020-04-252-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes RA more aggressive about eagerly priming the caches. In particular, this fixes an issue where even after RA was done priming its caches, an initial goto-definition request would have very high latency. This fixes that issue by requesting syntax highlighting for everything. It is presumed that this is a tad wasteful, but not overly so. This commit also tweaks the logic that determines when the cache is primed. Namely, instead of just priming it when the state is loaded initially, we attempt to prime it whenever some state changes. This fixes an issue where if a modification notification is seen before cache priming is done, it would stop the cache priming early.
* | | | Rename StructField -> FieldAleksey Kladov2020-04-2527-148/+132
| | | |
* | | | Merge #4134bors[bot]2020-04-252-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4134: Special case for empty comments in doc comment kind r=matklad a=edwin0cheng Part of #4103 Fix `ui/empty/empty-comment.rs macros` Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Fix whitespacesEdwin Cheng2020-04-251-1/+1
| | | | |