Aleksey Kladov
bdbdade036
move typeof to hover
2019-01-05 17:39:34 +03:00
Aleksey Kladov
9f44d4c56d
fold doc_comment into hover
2019-01-05 17:33:31 +03:00
Aleksey Kladov
3ad0037f90
move hover implementation to ra_analysis
2019-01-05 17:24:17 +03:00
Aleksey Kladov
2560a9e807
wip
2019-01-05 16:40:50 +03:00
Aleksey Kladov
ea3504057e
split import assist
2019-01-05 13:56:33 +03:00
bors[bot]
4a3ef8fe63
Merge #370
...
370: Self params & type r=matklad a=flodiebold
This implements type inference for `self`, so field completion for methods taking `self` works now.
- rename `IMPL_ITEM` to `IMPL_BLOCK` -- rustc calls the methods etc. inside an impl `ImplItem`s, and the impl itself doesn't define an item, so I thought this name was clearer.
- add HIR for impl blocks -- we collect all impls in a crate at once, so we can go from methods to containing impls, and since we will later also need to find all impls for a certain type (which may be anywhere in the crate, I think?). We could be more lazy here, but I don't know if it's worth the complexity.
- resolve `self` and `Self` during type inference
- refactor a bit in ty.rs as well
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-01-04 19:55:23 +00:00
Aleksey Kladov
6c8e54aaee
⬆️ salsa
2019-01-04 22:31:13 +03:00
Florian Diebold
e6aeabf96f
Rename ImplsInCrateQuery as well
2019-01-04 19:52:07 +01:00
Florian Diebold
0ad13b9477
Add a test for self field completion
...
Needed to add a default crate graph in the analysis for that.
2019-01-04 19:14:52 +01:00
Florian Diebold
ae9530addc
Add HIR for impl blocks
...
Since we need to be able to go from def to containing impl block, as well as the
other direction, and to find all impls for a certain type, a design similar to
the one for modules, where we collect all impls for the whole crate and keep
them in an arena, seemed fitting. The ImplBlock type, which provides the public
interface, then consists only of an Arc to the arena containing all impls, and
the index into it.
2019-01-04 19:10:47 +01:00
csmoe
f604ff5b2f
parse doc comment for items
2019-01-04 21:29:00 +08:00
Aleksey Kladov
d61707b4e1
index stuff produced by macros
2019-01-03 21:29:17 +03:00
Aleksey Kladov
ebd7c04faa
construct index from symbols directly
2019-01-03 21:29:05 +03:00
Aleksey Kladov
cd32177a25
don't create many compilation units for tests
2019-01-03 20:15:12 +03:00
Aleksey Kladov
9bb2a74256
embed file_id into FileSymbol
2019-01-03 19:55:34 +03:00
Aleksey Kladov
6be39ba758
fix the test
2019-01-03 19:08:24 +03:00
Aleksey Kladov
a4635a199b
more enterprisey assists API
2019-01-03 18:59:17 +03:00
Aleksey Kladov
a5935687cb
split assists over several files
2019-01-03 15:21:49 +03:00
Aleksey Kladov
5323e59996
rename code-actions -> assists
2019-01-03 15:21:31 +03:00
Aleksey Kladov
3e764f97eb
hardcode vec macro
2019-01-03 14:48:23 +03:00
bors[bot]
d29e98dd97
Merge #409
...
409: Add Analysis#teype_of test r=matklad a=h-michael
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2019-01-03 10:06:32 +00:00
Hirokazu Hata
4363e7b9b2
Deive type_of test from tests
2019-01-03 19:04:42 +09:00
Aleksey Kladov
8d61853509
docs
2019-01-03 12:57:30 +03:00
Hirokazu Hata
f99e96698c
Remove unnecessary mock functions
2019-01-03 18:27:02 +09:00
Aleksey Kladov
03ea6bcbff
use LocalPtr in navigation target
2019-01-03 12:26:40 +03:00
Aleksey Kladov
267a89bca2
use LocalSyntaxPtr for file symbol
2019-01-03 12:26:40 +03:00
Aleksey Kladov
f534d2132b
move some logic to navigation target
2019-01-03 12:26:40 +03:00
Aleksey Kladov
f673529a33
explain that completion shouldn't do filtering
2019-01-03 12:23:15 +03:00
Hirokazu Hata
f5992964ed
Add Analysis#teype_of test
2019-01-03 12:07:20 +09:00
Aleksey Kladov
28f6eedba5
simplify runnables
2019-01-02 20:12:38 +03:00
Aleksey Kladov
ef08b6c084
fix compilation
2019-01-02 19:41:57 +03:00
Aleksey Kladov
5d483cb998
doctrings
2019-01-02 19:40:41 +03:00
Aleksey Kladov
08d1537468
get rid of AnalysisImpl
2019-01-02 19:20:56 +03:00
Aleksey Kladov
e9b47dbb36
remove AnalysisHostImpl
2019-01-02 18:41:41 +03:00
Aleksey Kladov
2f22c861a9
remove some methods from analysis impl
2019-01-02 18:11:49 +03:00
Aleksey Kladov
a94530afb3
move world-symbols to file_symbols
2019-01-02 18:08:14 +03:00
bors[bot]
29d8bfb9c9
Merge #404
...
404: Move FileSymbol to ra_analysis r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-02 14:26:06 +00:00
Aleksey Kladov
76910639e6
fix tests
2019-01-02 17:25:28 +03:00
Aleksey Kladov
fb775a293d
make FileSymbol private
2019-01-02 17:11:04 +03:00
Aleksey Kladov
830abe0c1b
use navigation target in API
2019-01-02 17:09:39 +03:00
Aleksey Kladov
d25c89f760
introduce navigation target
2019-01-02 16:53:40 +03:00
Aleksey Kladov
a4b4fd7dc5
move symbols to ra_analysis
2019-01-02 16:29:08 +03:00
Aleksey Kladov
37ed2f35ba
rename MFileId -> HirFileId
2019-01-02 00:09:54 +03:00
Aleksey Kladov
756e878158
add items from macros to modules
2019-01-01 22:15:35 +03:00
Aleksey Kladov
e5b2fd6771
hard-code expansion of query_group
2019-01-01 22:15:35 +03:00
Aleksey Kladov
882a86240f
rename
2019-01-01 22:15:35 +03:00
Aleksey Kladov
b2fec18098
move more macros to hir
2019-01-01 22:15:35 +03:00
Aleksey Kladov
57030f587b
use macros database in analysis
2019-01-01 22:15:35 +03:00
gfreezy
39dab68404
place complete_use_tree_keyword in the same mod with complete_expr_keyword
2019-01-01 23:12:51 +08:00
gfreezy
9895529d5c
move to a seperate complete_use_tree_keyword mod
2019-01-01 23:00:29 +08:00