Commit Graph

4426 Commits

Author SHA1 Message Date
bors[bot]
8ba5617613 Merge #1377
1377: Use inline snapshots in complete_keyword r=matklad a=sbihel

Relates to #1127

Co-authored-by: Simon Bihel <simon.bihel@ens-rennes.fr>
2019-06-06 13:10:46 +00:00
bors[bot]
ba31481599 Merge #1380
1380: [#1083] Try block syntax r=matklad a=andreytkachenko

The `try` block syntax 

Co-authored-by: Andrey Tkachenko <andreytkachenko64@gmail.com>
2019-06-06 12:58:28 +00:00
Andrey Tkachenko
505b8d873f [#1083] Try block syntax: fix tests 2019-06-06 16:26:54 +04:00
Andrey Tkachenko
281c9eeaff [#1083] Try block syntax 2019-06-06 15:43:26 +04:00
bors[bot]
b79e6294a6 Merge #1379
1379: fix: clean up warnings r=matklad a=csmoe

r? @matklad 

Co-authored-by: csmoe <csmoe@msn.com>
2019-06-06 07:27:06 +00:00
csmoe
44363cd5d2 fix: clean up warnings
Change-Id: I91a468f6e846ac28574825b8ee7aa02fbff68f63
2019-06-06 10:06:46 +08:00
bors[bot]
354be0ae8a Merge #1378
1378: ⬆️ deps r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-05 19:53:29 +00:00
Aleksey Kladov
bab72fd18d ⬆️ deps 2019-06-05 22:49:42 +03:00
bors[bot]
5deb907b43 Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu

This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go.

cc #848 

Co-authored-by: Alan Du <alanhdu@gmail.com>
2019-06-04 22:14:46 +00:00
Alan Du
aa30c4909e Allow clippy::redundant_pattern_matching 2019-06-04 18:05:38 -04:00
Alan Du
02b6f871f1 Fix clippy::iter_cloned_collect 2019-06-04 18:05:07 -04:00
Alan Du
9b54b06ee3 Fix clippy::option_map_or_none 2019-06-04 18:05:07 -04:00
Alan Du
964edd9943 Fix clippy::while_let_loop 2019-06-04 18:05:07 -04:00
Alan Du
b28ca32db2 Fix clippy::or_fun_call 2019-06-04 18:05:07 -04:00
Alan Du
40424d4222 Fix clippy::identity_conversion 2019-06-04 18:05:07 -04:00
Alan Du
ed3d93b875 Fix clippy::single_char_pattern 2019-06-04 18:05:07 -04:00
Alan Du
682bf04bf4 Fix clippy::new_without_default 2019-06-04 18:05:07 -04:00
Alan Du
6939011b27 Fix clippy::assign_op_pattern 2019-06-04 18:05:07 -04:00
Alan Du
21d7964bc3 Fix clippy::useless_format 2019-06-04 18:05:07 -04:00
Alan Du
fb592d76aa Fix clippy::into_iter_on_ref 2019-06-04 18:05:07 -04:00
Alan Du
619a615298 Fix clippy::len_zero 2019-06-04 18:05:07 -04:00
Alan Du
7bcd8d6290 Fix clippy::unused_mut 2019-06-04 18:05:07 -04:00
Alan Du
6095e3fe19 Fix clippy::unnecessary_mut_passed 2019-06-04 18:05:07 -04:00
Alan Du
fafca4cb11 Fix clippy::ptr_arg 2019-06-04 18:05:07 -04:00
Alan Du
4e449fb0b0 Fix clippy::if_same_then_else 2019-06-04 18:05:07 -04:00
Alan Du
63e37f9536 Fix clippy::expect_fun_call 2019-06-04 18:05:07 -04:00
Alan Du
b9af1d7c42 Fix clippy::match_ref_pats 2019-06-04 18:05:07 -04:00
Alan Du
dddcb0ad94 Fix clippy::needless_return 2019-06-04 18:05:07 -04:00
Alan Du
ecd420636e Fix clippy::single_match 2019-06-04 18:05:07 -04:00
Simon Bihel
ec31f475ca
Use inline snapshots in complete_keyword 2019-06-04 21:26:12 +01:00
bors[bot]
8bd0e84424 Merge #1376
1376: fix debug scopes r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-04 11:47:32 +00:00
Aleksey Kladov
d2b23599b6 fix debug scopes 2019-06-04 14:46:22 +03:00
bors[bot]
fcf30d8fa5 Merge #1375
1375: switch to panic-safe salsa r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-04 10:30:55 +00:00
Aleksey Kladov
b3b096234a switch to panic-safe salsa 2019-06-04 13:30:07 +03:00
Alan Du
354db651da Fix clippy::clone_double_ref 2019-06-04 03:00:58 -04:00
Alan Du
573a6bb5c9 Fix clippy::match_bool 2019-06-04 03:00:58 -04:00
Alan Du
07ebf5528e Allow clippy::map_clone
We should turn it on after Iterator::copied stabilizes
2019-06-04 03:00:58 -04:00
Alan Du
557e90c6ca Allow clippy::needless_pass_by_value 2019-06-04 03:00:58 -04:00
Alan Du
a181fd318b Implement cargo lint to run clippy 2019-06-03 20:34:00 -04:00
bors[bot]
d1b9fa446a Merge #1373
1373: add couple of debug utils r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-03 21:28:16 +00:00
Aleksey Kladov
5264711b5d add couple of debug utils 2019-06-04 00:27:49 +03:00
bors[bot]
6aa8d8b99d Merge #1369
1369: don't cache parses twice r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 17:21:42 +00:00
Aleksey Kladov
8b7f58976b don't cache parses twice
Before this commit, `Parse`s for original file ended up two times in
salsa's db: first, when we parse original file, and second, when we
parse macro or a file.

Given that parse trees are the worst ofenders in terms of memory, it
makes sense to make sure we store them only once.
2019-06-02 20:15:10 +03:00
bors[bot]
ae8fd982c0 Merge #1368
1368: Store referece instead of full token tree in tokenbuffer r=matklad a=edwin0cheng

This PR try to minimize the memory allocation in converting `SyntaxNode` to `TokenTree` by using reference isnteead of full token tree in `TokenBuffer`. 

Note that the final goal is replace `TokenTree` with TokenBuffer such that there is no conversion between them.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-06-02 17:09:49 +00:00
Edwin Cheng
824f413d75 unnecessary paranthesis 2019-06-03 01:05:58 +08:00
Edwin Cheng
54ea251bd4 Store referece in tokenbuffer 2019-06-03 00:54:33 +08:00
bors[bot]
b40c6de8a6 Merge #1367
1367: collect macro queries r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 15:59:12 +00:00
Aleksey Kladov
2f02e1a8ba collect macro queries 2019-06-02 18:58:49 +03:00
bors[bot]
82cf27b5fc Merge #1362
1362: Introduce AST database r=matklad a=matklad

The idea here is to separate fragile bits which look into the syntax directly from robust bits which are safe across reparses. This uses the new `salsa::requires` featue

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 09:32:26 +00:00
Aleksey Kladov
5af9e475f4 add AstDatabase 2019-06-02 12:27:36 +03:00