Commit graph

10792 commits

Author SHA1 Message Date
Jonas Schievink
ed2817e599 Move limit check down 2020-06-10 12:40:33 +02:00
Jonas Schievink
56c7145993 Limit import map queries 2020-06-10 12:40:33 +02:00
Jonas Schievink
bcf875f46a Clean up import_map.rs 2020-06-10 12:38:58 +02:00
Jonas Schievink
781b514e58 Add test for macro generated items 2020-06-10 12:38:58 +02:00
Jonas Schievink
a70a0ca73c ImportsLocator: use ImportMap for non-local crates 2020-06-10 12:38:58 +02:00
Jonas Schievink
b01fb22494 ra_hir: expose import_map::search_dependencies 2020-06-10 12:38:58 +02:00
Jonas Schievink
6463d3ac63 symbol_index: allow querying a single crate 2020-06-10 12:38:58 +02:00
Jonas Schievink
4bcf8c8c68 Add an FST index to ImportMap 2020-06-10 12:38:58 +02:00
Jonas Schievink
54936e8aa2 Fix the symbol query limit 2020-06-10 12:38:58 +02:00
Jonas Schievink
d50a1a0fe9 Profile world_symbols 2020-06-10 12:38:58 +02:00
bors[bot]
f632727b2a
Merge #4834
4834: In field patterns, don't highlight local binding as a field r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-10 10:37:27 +00:00
Aleksey Kladov
db1cadd444 In field patterns, don't highlight local binding as a field 2020-06-10 12:34:23 +02:00
Matthew Jasper
506e1ddbfa Separating parsing of for in predicates and types 2020-06-10 11:30:58 +01:00
bors[bot]
9251f181de
Merge #4832
4832: Reduce OUT_DIR special casing r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-10 10:09:06 +00:00
Aleksey Kladov
27ebe5d33e Reduce OUT_DIR special casing 2020-06-10 12:08:35 +02:00
bors[bot]
560b98bc50
Merge #4822
4822: Let checkOnSafe default to some of the options of cargo r=matklad a=clemenswasser

This will fix #4631
The implementation works (as far as I have tested) but is suboptimal because I am copying the "cargo.features".

Co-authored-by: Clemens Wasser <clemens.wasser@gmail.com>
2020-06-10 07:39:44 +00:00
Clemens Wasser
fe21fc2d25 checkOnSafe.features and checkOnSafe.allFeatures now work identically. 2020-06-10 09:37:26 +02:00
Clemens Wasser
33b9058838 Most of the checkOnSafe options now default to the cargo equivalent. 2020-06-10 09:27:25 +02:00
Clemens Wasser
47ef544fa5 Added the rust-analyzer.checkOnSave.features option. 2020-06-10 08:51:11 +02:00
bors[bot]
c9fc7251ca
Merge #4824
4824: Correct "debug_assertion" to "debug_assertions" to match the cfg that the rust debug assert macros use. r=matklad a=woody77

This is for #4823.

Co-authored-by: Aaron Wood <aaronwood@google.com>
2020-06-10 05:24:18 +00:00
Aaron Wood
f4ed2da966 Correct "debug_assertion" to "debug_assertions" to match the cfg
option that the rust debug assert macros use.
2020-06-09 19:58:39 -07:00
Clemens Wasser
684b6fa1b8 flycheck now uses the configured features 2020-06-09 21:47:54 +02:00
Benjamin Coenen
9d0a6aaee3 display Doctest code lens before comment #4785
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-06-09 21:28:51 +02:00
bors[bot]
ba821afa24
Merge #4815
4815: Correctly parse <_> paths in patterns r=matklad a=matklad

closes #3659



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 11:47:11 +00:00
Aleksey Kladov
e8d50578ab Correctly parse <_> paths in patterns
closes #3659
2020-06-09 13:45:18 +02:00
Aleksey Kladov
16943e533c Minor, use T! 2020-06-09 13:45:11 +02:00
bors[bot]
d4d384e4c8
Merge #4813
4813: Simplify r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 11:22:38 +00:00
Aleksey Kladov
d8571e076c Simplify 2020-06-09 13:17:22 +02:00
bors[bot]
eb53f5a9e5
Merge #4812
4812: Use correct indent when replacing with match r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 11:14:30 +00:00
Aleksey Kladov
8cad7d1a2b Use correct indent when replacing with match 2020-06-09 12:38:47 +02:00
bors[bot]
382d10ea60
Merge #4811
4811: Unwrap block works with match arms r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 10:12:50 +00:00
Aleksey Kladov
53cc2c16e7 Unwrap block works with match arms 2020-06-09 11:52:45 +02:00
bors[bot]
4cacedd3de
Merge #4810
4810: Simplify unwrapping of blocks r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 09:33:56 +00:00
Aleksey Kladov
5233766ce5 Simplify unwrapping of blocks 2020-06-09 11:33:28 +02:00
bors[bot]
6f0cc91c88
Merge #4803
4803: Parse default unsafe fn r=matklad a=Avi-D-coder



Co-authored-by: Avi Dessauer <avi.the.coder@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-09 08:56:28 +00:00
Aleksey Kladov
2785362a1f
Update crates/ra_parser/src/grammar/items.rs 2020-06-09 10:50:25 +02:00
bors[bot]
7ae2228039
Merge #4805
4805: Finish JsonProject transition to cfgs from the separate atoms and features. r=matklad a=woody77

Here's the rest of the transition.

Co-authored-by: Aaron Wood <aaronwood@google.com>
2020-06-09 08:48:56 +00:00
Aaron Wood
055b9b64bc Finish transition to cfgs from the separate atoms and features. 2020-06-08 16:19:39 -07:00
bors[bot]
733ef3163c
Merge #4804
4804: Simplify API r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-08 22:03:20 +00:00
Aleksey Kladov
38fa4d17fb Simplify API 2020-06-09 00:01:53 +02:00
Avi Dessauer
e38685cb48 Parse default unsafe fn 2020-06-08 17:49:06 -04:00
bors[bot]
3999bbba1b
Merge #4802
4802: Simplify r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-08 19:49:04 +00:00
Aleksey Kladov
2a42904680 Simplify 2020-06-08 21:48:23 +02:00
bors[bot]
47e742f598
Merge #4797
4797: Dev docs nits r=matklad a=lnicola

indenpendence

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-06-08 19:26:48 +00:00
bors[bot]
3a7c218fd4
Merge #4576
4576: Add implementation of extract struct from enum variant r=matklad a=mcrakhman

Hi guys! I implemented the extraction functionality including modifying multiple files. The only thing I didn't change the cursor position. I've done it with a previous API, but now snippets have been introduced and I need to figure out how to do it.

Please bear in mind that I am a newcomer in the rust-analyzer (and also Rust) world, so I tried to implement the feature to the best of my knowledge, but the API is very new to me, so I am very welcome to introducing changes etc. 

Co-authored-by: Mikhail Rakhmanov <rakhmanov.m@gmail.com>
2020-06-08 16:28:48 +00:00
bors[bot]
38ac331f7d
Merge #4784
4784: Change management of test cfg to better support json projects r=Nashenas88 a=Nashenas88

This helps support json projects where they can decide whether to add the `test` cfg or not. One alternative is to add support for marking json project crates as a sysroot crate, and adding logic to remove the `test` cfg in those cases. In my opinion, that option gives less flexibility to json projects and leads to more functionality that needs to be maintained.

Fixes #4508 
cc @woody77 

Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
2020-06-08 16:20:45 +00:00
Paul Daniel Faria
dbceaf522b Use Option<&str> for target instead of Option<&String> 2020-06-08 12:10:23 -04:00
Laurențiu Nicola
e3663d60bf
Dev docs nits 2020-06-08 18:50:27 +03:00
Paul Daniel Faria
9c35f135b9 Remove default_cfg_options, pass target instead so it can be used for building cargo workspaces 2020-06-08 10:23:29 -04:00
bors[bot]
5ed9818a7c
Merge #4796
4796: Fix unsafe highlihgintngs r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-08 13:23:38 +00:00