Commit graph

896 commits

Author SHA1 Message Date
Omer Ben-Amram
feb5a4a8b8 fixed rainbow-highlighting test 2019-12-15 10:20:22 +02:00
Edwin Cheng
3ba4b3c554 Use simpler logic on original_range 2019-12-15 02:34:16 +08:00
bors[bot]
d6223253b6
Merge #2561
2561: Split generic and non-generic paths r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-14 18:16:48 +00:00
Aleksey Kladov
2619950b3b Use different types for path with and without generics 2019-12-14 19:15:40 +01:00
Edwin Cheng
b53587c7bd Re-export Origin to replace ExpansionOrigin 2019-12-15 01:46:39 +08:00
Edwin Cheng
61360fdfec Fix original_source find order 2019-12-15 01:24:51 +08:00
Omer Ben-Amram
083010f633 removed type.alias 2019-12-14 13:29:42 +02:00
Omer Ben-Amram
67641d3f5f added decorations 2019-12-14 13:24:07 +02:00
succcubbus
c82529a97f for goto and hover pick the token based on a priority 2019-12-13 22:00:05 +01:00
succcubbus
4f7da04c67 add tests for goto on tuple fields 2019-12-13 21:59:25 +01:00
succcubbus
6c133017a8 try both surrounding tokens for hover 2019-12-13 21:10:25 +01:00
succcubbus
6c42eb1930 add failing test 2019-12-13 19:54:07 +01:00
succcubbus
f54fef85aa use find() instead of filter().next() 2019-12-13 19:54:02 +01:00
succcubbus
4df741ecb2 fix goto definition when inbetween tokens
fixes both goto_definition and goto_type_definition.
before, when running goto between some non-trivia token and an
identifier, goto would be attempted for the non-trivia token.
but this does not make sense for e.g. L_PAREN or COLONCOLON only for
IDENTs. now only IDENTs will be searched for in goto actions.
2019-12-13 19:20:02 +01:00
Omer Ben-Amram
30672c420e scopes resolution is more granular 2019-12-13 19:03:48 +02:00
Edwin Cheng
47f2b5d0d9 Map first and last node in original_range 2019-12-13 02:39:14 +08:00
Gabriel Luo
20ccabc01d Fixed #2250
Tuple in type annotation expands correctly;
Expansion will prefer the following delimiter when possible. 
New regression tests added to verify the consistency between tuple expansion in type annotation and tuple expansion in rvalue.
2019-12-10 22:18:05 -05:00
Aleksey Kladov
b683cbd93d Report correct original range in goto_definition 2019-12-09 19:46:35 +01:00
bors[bot]
6b1c2ee168
Merge #2500 #2505 #2506
2500: Fix format_args expansion & go to definition r=matklad a=flodiebold

The expansion of format_args wasn't yet correct enough to type-check. Also make macros in statement position expand to expressions for now, since it's not handled correctly in HIR lowering yet. This finally fixes go to definition within print macros, I think 🙂 

2505: Remove more dead code r=matklad a=matklad



2506: Remove one more Ty r=matklad a=matklad



Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-12-08 16:53:21 +00:00
Aleksey Kladov
61c3887b70 Remove one more Ty 2019-12-08 17:50:43 +01:00
Aleksey Kladov
a1639d0d1e Remove more dead code 2019-12-08 17:45:14 +01:00
Florian Diebold
2223620313 Fix range in goto_through_format test 2019-12-08 13:02:52 +01:00
Florian Diebold
91f28e43a2 Fix expansion of format_args 2019-12-08 13:02:52 +01:00
Aleksey Kladov
b37c6a746b Remove ty from code_model 2019-12-08 12:44:14 +01:00
Aleksey Kladov
08d3166c8b Cleanup Crate API 2019-12-08 12:02:53 +01:00
Aleksey Kladov
88c5b1282a Rename GenericParam -> TypeParam
We don't have LifetimeParam yet, but they are planned!
2019-12-07 20:25:48 +01:00
Aleksey Kladov
f4f8b81474 Get the right analyzer for impls 2019-12-07 20:05:08 +01:00
Aleksey Kladov
7d2080a031 Classify name works for TypeParams 2019-12-07 19:52:09 +01:00
Aleksey Kladov
d1a01aa2f8 Gotodef for TypeParameters 2019-12-07 19:44:43 +01:00
Aleksey Kladov
1692f07393 ToNav for GenericParam 2019-12-07 19:44:43 +01:00
Aleksey Kladov
decc4cb084 Show type hints for & patterns 2019-12-07 19:15:52 +01:00
Florian Diebold
c80dc0ad3a Make the goto_through_format test actually fail :( 2019-12-06 21:25:22 +01:00
Florian Diebold
a565072dde Try to make go to definition work in format!
SourceAnalyzer didn't work properly within expression macro expansions because
it didn't find the enclosing function. Fix this by going up the expansion chain
to find ancestors. This makes the test work, but apparently in real usage it's
still not working.
2019-12-06 21:25:22 +01:00
ice1000
7702f690a9 One pub function less is good! 2019-12-05 08:28:31 -05:00
ice1000
088f50c0ab No block at the moment 2019-12-04 18:30:42 -05:00
ice1000
38853459e3 Add ModuleSource::Block 2019-12-04 18:30:42 -05:00
Vincent Rouillé
b437dca4bd
Run rustfmt with respect to Cargo.toml edition 2019-12-04 23:05:01 +01:00
ice1000
009437f5d9 Replace ra_hir_expand::either with crate 2019-12-03 11:07:56 -05:00
Florian Diebold
a5a07bde04 Add tests for checking the impl self type 2019-12-02 19:33:13 +01:00
Wilco Kusee
b3856568af
Push identifier check to rename function 2019-11-29 16:06:20 +01:00
Wilco Kusee
645df2b5f5
Test rename for various identifiers 2019-11-29 16:03:39 +01:00
Wilco Kusee
be9ba2b392
Move identifier check to analysis 2019-11-29 15:52:12 +01:00
Aleksey Kladov
ccd1b0800a Rename Source -> InFile 2019-11-28 12:50:26 +03:00
Aleksey Kladov
1d14fd1737 Use Name::missing consistently 2019-11-27 23:22:20 +03:00
Aleksey Kladov
27b362b059 Reformat 2019-11-27 21:44:38 +03:00
Aleksey Kladov
757e593b25 rename ra_ide_api -> ra_ide 2019-11-27 21:35:06 +03:00