Commit graph

2770 commits

Author SHA1 Message Date
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
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
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
Aleksey Kladov
2f02e1a8ba collect macro queries 2019-06-02 18:58:49 +03:00
Aleksey Kladov
5af9e475f4 add AstDatabase 2019-06-02 12:27:36 +03:00
Aleksey Kladov
011599df27 collect types and bodies 2019-06-01 22:47:20 +03:00
Aleksey Kladov
f7d3a87305 collect impl source maps 2019-06-01 22:31:22 +03:00
Aleksey Kladov
d7a2a9171e don't cache ast_id_to_node 2019-06-01 22:14:42 +03:00
Aleksey Kladov
37e80c5297 show macro expanded trees in the stats as well 2019-06-01 22:13:24 +03:00
bors[bot]
ccec71165b Merge #1360
1360: Improve goto definition for MBE r=matklad a=edwin0cheng

This PR improve the macro resolution for goto definition and expression macro invocation by using proper path resolution for external macros. 



Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-06-01 17:48:06 +00:00
Edwin Cheng
371961be0e Improve goto definition for MBE 2019-06-01 19:34:19 +08:00
bors[bot]
1e6b45b05a Merge #1359
1359: don't poison mutex around chalk r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-01 08:00:00 +00:00
Aleksey Kladov
f89d34be6a don't poison mutex around chalk
We use panics for cancellation, so we could trigger panic while
holding the solver. std::sync::Mutex will be poisoned as a result,
which and all further attempts to use solver (from other threads) will
panic as well.

This commit switches to parking_lot::Mutex which just unlocks on panic.
2019-06-01 10:57:44 +03:00
Aleksey Kladov
4dd7faed34 apply profile filter to top-level entries only 2019-06-01 10:41:47 +03:00
Aleksey Kladov
bf801953a3 rename 2019-06-01 10:31:40 +03:00
Aleksey Kladov
678a458543 move subs inside 2019-06-01 10:24:43 +03:00
Aleksey Kladov
78e17f65cf use sync queries for join lines and friends 2019-05-31 20:53:00 +03:00
Aleksey Kladov
c6537c3280 add sync requests 2019-05-31 20:50:16 +03:00
Aleksey Kladov
9697d8afad cleanup 2019-05-31 20:42:53 +03:00
Aleksey Kladov
15efd58274 cleanup 2019-05-31 20:30:14 +03:00
Aleksey Kladov
2d773a46c9 simplify 2019-05-31 20:23:56 +03:00
Aleksey Kladov
e1bda6aeda move completed requests to a separate file 2019-05-31 20:14:54 +03:00
Aleksey Kladov
838915c9a2 simplify 2019-05-31 19:24:33 +03:00
Aleksey Kladov
8bb02859e8 introduce constant 2019-05-31 19:20:22 +03:00
Aleksey Kladov
0e542936be minor 2019-05-31 19:17:46 +03:00
Laurențiu Nicola
be15541b03 Sort hover results in tests 2019-05-30 21:20:17 +03:00
Aleksey Kladov
b6a854e161 update ra_ide_api to use builtins 2019-05-30 16:10:07 +03:00