Aleksey Kladov
4d81432213
allow compiling ra_ide_api on wasm
2019-09-20 20:39:02 +03:00
kjeremy
e26c41d611
A few doc comments
2019-09-19 17:07:23 -04:00
bors[bot]
cd9b222ba0
Merge #1853
...
1853: Introduce FromSource trait r=matklad a=viorina
The idea is to provide an ability to get HIR from AST in a more general way than it's possible using `source_binder`.
It also could help with #1622 fixing.
Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-09-19 18:18:41 +00:00
Ekaterina Babshukova
2867c40925
introduce FromSource trait
2019-09-19 19:38:27 +03:00
Mazdak Farrokhzad
2be9031935
Pacify rustfmt.
2019-09-19 17:37:41 +02:00
Mazdak Farrokhzad
1f97445f39
fold_kind
: MATCH_ARM_LIST => FoldKind::Block
2019-09-19 17:22:08 +02:00
Florian Diebold
a040fde3ae
Remove TraitItem and ImplItem in favor of AssocItem
2019-09-17 19:47:45 +02:00
Florian Diebold
828d60574f
Refactor a bit to prepare for resolving trait assoc items
2019-09-17 19:47:45 +02:00
Florian Diebold
613863abb9
Remove a dbg!
2019-09-14 11:05:42 +02:00
Aleksey Kladov
7be7f67198
rename add_resolution -> add_scope_def
2019-09-13 16:39:51 +03:00
Aleksey Kladov
51e2d76b98
Specify desirable namespace when calling resolve
...
That way, we are able to get rid of a number of unreachable statements
2019-09-13 16:24:10 +03:00
Aleksey Kladov
114a1b878e
rename AdtDef -> Adt
2019-09-13 00:34:52 +03:00
Aleksey Kladov
45117c6388
make various enums "inherit" from AdtDef
2019-09-13 00:10:16 +03:00
Kirill Bulatov
9c2a3da67c
Complete vec macros with square brackets
2019-09-12 12:16:09 +03:00
Kirill Bulatov
1852b27233
Add !
to the macro completion label
2019-09-12 12:15:33 +03:00
Kirill Bulatov
037e02c08d
Complete macros parenthesis
2019-09-12 12:15:33 +03:00
uHOOCCOOHu
6353b1621f
Split out complete_macro_in_item_position
2019-09-11 22:44:44 +08:00
uHOOCCOOHu
c033d18700
Fix typo
2019-09-11 22:39:02 +08:00
uHOOCCOOHu
c66a789a04
Show macro definition in hover text
2019-09-10 13:33:02 +08:00
uHOOCCOOHu
7de9537ccc
Support completion for macros
2019-09-10 13:32:47 +08:00
Aleksey Kladov
ef2b84ddf1
introduce hir debugging infra
...
This is to make debugging rust-analyzer easier.
The idea is that `dbg!(krate.debug(db))` will print the actual, fuzzy
crate name, instead of precise ID. Debug printing infra is a separate
thing, to make sure that the actual hir doesn't have access to global
information.
Do not use `.debug` for `log::` logging: debugging executes queries,
and might introduce unneded dependencies to the crate graph
2019-09-09 12:32:16 +03:00
Aleksey Kladov
6c11935712
simplify
2019-09-06 21:57:11 +03:00
Aleksey Kladov
9ae455ea52
make source_root API more abstract
2019-09-06 14:21:11 +03:00
Aleksey Kladov
33965f0f3e
fix renaming of modules
2019-09-05 21:36:40 +03:00
Aleksey Kladov
8b8a11ded7
always use \n newlines
2019-09-05 17:50:39 +03:00
Florian Diebold
b8c1e402fa
Make type walking infrastructure a bit nicer
...
If/when we switch to using Chalk's Ty, we'll need to replace this by its `Fold`
trait, but I didn't want to import the whole thing just yet.
2019-09-03 14:00:35 +02:00
Aleksey Kladov
e94587e315
fix assists
2019-09-02 21:52:06 +03:00
Aleksey Kladov
5e3f291195
fix hir for new block syntax
2019-09-02 21:23:19 +03:00
Aleksey Kladov
0f6c048ce1
⬆️ insta
2019-08-29 17:04:01 +03:00
Phil Ellison
14a23d1bde
Strip indents and empty lines in check_apply_diagnostic_fix_from_position
2019-08-25 12:56:23 +03:00
Phil Ellison
59dd30402b
Specify cursor position in ok-wrapping tests, and switch to using analysis_and_position function
2019-08-25 12:56:23 +03:00
Phil Ellison
6620949cae
Simplify checking return type, add new test
2019-08-25 12:56:23 +03:00
Phil Ellison
4f6f3933ec
cargo format
2019-08-25 12:55:56 +03:00
Phil Ellison
456e72c4e4
Change test to not rely on trait inference
2019-08-25 12:55:56 +03:00
Phil Ellison
a40e390860
Check type rather than just name in ok-wrapping diagnostic. Add test for handling generic functions (which currently fails)
2019-08-25 12:55:56 +03:00
Phil Ellison
62c2002e2b
Add test that ok-wrapping handles type aliases
2019-08-25 12:55:55 +03:00
Phil Ellison
d025016f92
Mock std String and Result types in tests for ok-wrapping diagnostic
2019-08-25 12:55:55 +03:00
Phil Ellison
d00a285fa7
Initial implementation of Ok-wrapping
2019-08-25 12:55:55 +03:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
bors[bot]
0a612fad02
Merge #1715
...
1715: Feature flags r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-08-22 12:17:21 +00:00
Aleksey Kladov
69bbe79c50
implement feature flags
2019-08-22 15:07:31 +03:00
cynecx
1d87f85441
Update snapshots/highlighting.html to use correct highlighting
2019-08-22 01:08:07 +02:00
cynecx
5534167f58
Fix syntax-highlighting for fields (NAMED_FIELD_DEF
)
2019-08-22 00:39:18 +02:00
Aleksey Kladov
db84437d6f
qualify ast types with ast::
...
By convention, ast nodes should always be used as `ast::FnDef`. This
is to avoid confusion with similarly-named hir types.
2019-08-19 14:27:15 +03:00
Aleksey Kladov
df6dce23a7
remove ast::*Kind from ra_ide_api
2019-08-19 14:13:58 +03:00
bors[bot]
cd24349997
Merge #1691
...
1691: Show inherent and trait impls of structs and enums r=viorina a=viorina
Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-08-16 14:24:51 +00:00
Ekaterina Babshukova
35a04ec066
show inherent and trait impls of structs and enums
2019-08-16 17:07:45 +03:00
Aleksey Kladov
343463c824
implement durability
2019-08-15 15:27:00 +03:00
Evgenii P
475a93097f
Use Source in Diagnostic and implement
2019-08-12 23:06:08 +07:00
Aleksey Kladov
6efc79b89d
implement while let desugaring
2019-08-07 15:14:22 +02:00