Aleksey Kladov
4f94af3c4a
use Source for Function
2019-06-11 18:28:51 +03:00
Aleksey Kladov
36865adcb9
Introduce HasSource trait
2019-06-11 18:28:51 +03:00
Aleksey Kladov
2a1fe26b6d
use Source more
2019-06-11 18:28:51 +03:00
Aleksey Kladov
91c120ccea
introduce Source struct
2019-06-11 18:28:51 +03:00
Shotaro Yamada
acafbd66f8
Fix hover for pat that shadows items
2019-06-11 23:46:33 +09:00
bors[bot]
3f5f9f0560
Merge #1391
...
1391: rename tools -> ra_tools r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-10 22:49:51 +00:00
Aleksey Kladov
10d34532e3
rename tools -> ra_tools
...
This should help with caching on CI I hope (see .travis.yml
before_cache)
2019-06-11 01:47:37 +03:00
Aleksey Kladov
156b7ee842
use single version of either in hir
2019-06-11 01:26:20 +03:00
Edwin Cheng
656a0fa9f9
Simpliy hover on ast::name
2019-06-11 01:18:32 +08:00
Edwin Cheng
34322ea9a3
Use classify_name_ref in hover
2019-06-11 00:34:43 +08:00
bors[bot]
cbafae6fa8
Merge #1388
...
1388: Remove NavigationTarget::node and fill docs and description in during construction r=matklad a=edwin0cheng
Related dissused:
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/MBE.20discussion/near/167105559
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-06-09 19:45:35 +00:00
Edwin Cheng
60938ff73e
Remove incorrect FIXME
2019-06-10 03:41:21 +08:00
Edwin Cheng
9ded8d2eab
Formating
2019-06-10 03:39:42 +08:00
Edwin Cheng
e91bf0bba4
Use &str instread of Option<String>
2019-06-10 03:37:34 +08:00
Edwin Cheng
fc70275fed
Rename "string" to "buf"
2019-06-10 03:30:03 +08:00
Edwin Cheng
41cb3fd758
Rename Description to ShortLabel
2019-06-10 03:28:53 +08:00
Edwin Cheng
358ad0efca
Make description_from_symbol depends on symbol
2019-06-10 00:20:49 +08:00
Edwin Cheng
4db0f0ccaf
Rename description funcs
2019-06-10 00:09:19 +08:00
Edwin Cheng
e9848b2e6c
Change docs and description to getter method
2019-06-10 00:04:03 +08:00
Edwin Cheng
aacc894134
Add display::Description
2019-06-09 23:59:59 +08:00
Edwin Cheng
2acf1e16fc
Construct doc individually
2019-06-09 03:27:01 +08:00
Aleksey Kladov
caefa6982b
remove some hacks from nameresolution for macros
2019-06-08 20:42:02 +03:00
Aleksey Kladov
780e1a365b
somewhat better name
2019-06-08 18:38:14 +03:00
Edwin Cheng
d46278d320
Remove node function in NavTarget
2019-06-08 22:27:11 +08:00
Aleksey Kladov
ac64967872
add a fixme
2019-06-08 14:55:25 +03:00
Aleksey Kladov
1b783e33e9
one macro def should be enough
2019-06-08 14:48:56 +03:00
Aleksey Kladov
2c28f5245d
make documenation a query
2019-06-08 14:36:39 +03:00
Aleksey Kladov
33026c654e
make Docs handing more ideomatic
2019-06-08 14:16:05 +03:00
Aleksey Kladov
5dc2789895
Move docs to dedicated module
2019-06-08 13:53:14 +03:00
csmoe
205a8278a9
fix: never type with binding
...
Change-Id: I14e1bc628b9d2dfdb1f40de3d3707f4e872767f2
2019-06-07 19:49:49 +08:00
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
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
csmoe
44363cd5d2
fix: clean up warnings
...
Change-Id: I91a468f6e846ac28574825b8ee7aa02fbff68f63
2019-06-06 10:06:46 +08: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
Aleksey Kladov
d2b23599b6
fix debug scopes
2019-06-04 14:46:22 +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
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
Aleksey Kladov
c6ee9d681c
add tests for primitive types
2019-05-30 15:14:11 +03:00
Aleksey Kladov
97158f5c8a
add built-in types to scopes
2019-05-30 15:03:58 +03:00
Aleksey Kladov
4e5b02966b
add list of builtin types
2019-05-30 14:26:27 +03:00
Aleksey Kladov
e6545cc647
add ModuleDef::BuiltInType
2019-05-30 14:06:28 +03:00
Aleksey Kladov
54f77ad68d
switch to upstream salsa
2019-05-30 13:05:09 +03:00
Aleksey Kladov
18ed351747
⬆️ parking_lot
2019-05-30 12:02:30 +03:00
Aleksey Kladov
0ee5bd16c9
cancel salsa's validation
...
This small fix should improve rust-analyzer resopnsivness for
real-time operations like onEnter handling.
Turns out, salsa's validation can take hundreds of milliseconds, and,
in case no changes were made, it won't be triggering any queries.
Because we check for cancellation in queries, that means that
validation is not cancellable!
What this PR does is injecting check_canceled checks into validation,
by using salsa's event API, which wasn't meant to be used like this,
but, hey, it works!
Here's the onEnter handling before and after this change:
https://youtu.be/7-ffPzgvH7o
2019-05-30 10:06:02 +03:00
bors[bot]
8c3cd8f121
Merge #1346
...
1346: bump timeout for CI r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-29 19:18:57 +00:00