Aleksey Kladov
5a505189a8
adjust comments
2019-01-06 17:35:57 +03:00
Aleksey Kladov
c303e6fbdf
fix ra_analysis to work with the new API
2019-01-06 17:35:57 +03:00
Aleksey Kladov
a7f4f7bfcc
split module source into decl/defin
2019-01-06 17:35:57 +03:00
Aleksey Kladov
61687b9db6
fix tests
2019-01-06 17:35:29 +03:00
Florian Diebold
98957f4e6f
Add fn signature query
2019-01-06 01:13:31 +01:00
Florian Diebold
8e3e5ab2c8
Make FnScopes use hir::Expr
...
This was a bit complicated. I've added a wrapper type for now that does the
LocalSyntaxPtr <-> ExprId translation; we might want to get rid of that or give
it a nicer interface.
2019-01-06 00:29:36 +01:00
Florian Diebold
136aba1cf3
Add HIR Expr machinery
2019-01-05 22:41:12 +01:00
Aleksey Kladov
01cf32c46e
fix tests
2019-01-05 21:09:11 +03:00
Aleksey Kladov
be84a112a7
show types in local variable hovers
2019-01-05 20:53:30 +03:00
Aleksey Kladov
ee461a2111
kill approximatelly_resolve_symbol
2019-01-05 20:00:03 +03:00
Aleksey Kladov
da32463cbf
inline goto_defention tests
2019-01-05 19:41:43 +03:00
Aleksey Kladov
c2a0f5e50f
move goto_defenition to a separate file
2019-01-05 19:30:49 +03:00
Aleksey Kladov
4551155073
introduce separate goto_defenition
2019-01-05 19:30:49 +03:00
Aleksey Kladov
ad2a5da259
kill accidentally added file
2019-01-05 19:30:42 +03:00
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