Aleksey Kladov
fabb32693f
disable periodic GC
...
There's hypothesis that it doesn't do anything useful now that we have
LRU...
2019-09-26 12:31:16 +03:00
Florian Diebold
d0d1a202d4
Fix retrieval of the Fn traits
...
I used the wrong query, so it only used the lang items from the respective
crate...
2019-09-25 20:04:37 +02:00
Aleksey Kladov
efeae82f52
clean up naming
2019-09-25 15:58:40 +03:00
Aleksey Kladov
98639d835c
cleanup diagnostics
2019-09-25 15:39:41 +03:00
Aleksey Kladov
32843ae6f7
shorten AstBuilder names
2019-09-25 15:28:26 +03:00
Aleksey Kladov
25fca04753
cleaned up record field builder
2019-09-25 15:09:03 +03:00
Aleksey Kladov
69689625ce
move ast builder to a separate file
2019-09-25 14:35:26 +03:00
Aleksey Kladov
f32081fa18
move assists to subdir
2019-09-25 14:29:41 +03:00
Shotaro Yamada
9c45a9e586
Remove redundant clone()
2019-09-25 10:32:01 +09:00
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
Kirill Bulatov
3fb6462d54
Style and test fixes
2019-08-05 01:02:36 +03:00
Kirill Bulatov
15411d4474
Use proper inlay kinds
2019-08-05 00:28:36 +03:00
bors[bot]
4912cc35af
Merge #1634
...
1634: Implement .await completion for futures r=flodiebold a=eupn
Closes #1263 with completion for `.await` syntax for types that are implementing `std::future::Future` trait.
r? @flodiebold
Co-authored-by: Evgenii P <eupn@protonmail.com>
2019-08-04 09:42:17 +00:00
Laurențiu Nicola
5153001889
Bump deps
2019-08-04 10:43:51 +03:00
Evgenii P
d610adfc2b
Employ early return pattern more
2019-08-04 08:03:17 +07:00
Evgenii P
6a94f203fc
Use std::future::Future trait from stdlib
2019-08-03 17:07:20 +07:00
Evgenii P
957de26a1d
do fixup: remove unused imports in complete_dot.rs
2019-08-03 02:48:36 +07:00
Evgenii P
40facb559a
Change postfix completion to keyword completion
2019-08-03 02:40:59 +07:00
Evgenii P
ab7774545c
Use future lang item instead of hardcoded std::future::Future
2019-08-03 01:53:51 +07:00
Evgenii P
30bc3b93be
rustfmt
2019-08-03 01:16:20 +07:00
Evgenii P
c417b98f02
Implement completion for the .await syntax
2019-08-03 01:15:43 +07:00
kjeremy
8d2068cf32
Update insta to 0.9.0 and cargo update
2019-07-31 10:05:00 -04:00
bors[bot]
359b3376b3
Merge #1601
...
1601: Inline snapshots for tests r=matklad a=theotherphil
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/1127 .
The "cargo format" commits are required to get the formatting tests to pass. However, they actually mess up the formatting.
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
2019-07-29 12:54:40 +00:00
Kirill Bulatov
b8f95f42e1
Support destructuring patterns
2019-07-29 00:33:10 +03:00
Phil Ellison
67e75ca126
Rerun cargo format, to make tests pass and formatting incorrect
2019-07-28 12:45:01 +01:00
Phil Ellison
44b2642900
Remove vertical ellipses in references.cs
2019-07-28 12:37:03 +01:00
Phil Ellison
1b74eed8ca
Remove vertical ellipses from tests in complete_snippet.rs and presentation.rs
2019-07-28 12:33:21 +01:00
Phil Ellison
46c07ed578
Remove vertical ellipses from tests in complete_scope.rs
2019-07-28 12:28:14 +01:00
Phil Ellison
5c4df97996
cargo format
2019-07-28 12:08:06 +01:00
Phil Ellison
9f6909c0ce
Inline snapshot for test_file_structure (less clear that this one is a good idea)
2019-07-28 12:01:28 +01:00
Phil Ellison
a72331f223
Inline snapshots for all tests in runnables.rs
2019-07-28 11:57:56 +01:00
Phil Ellison
8f71614bdd
Inline snapshots for all tests in references.rs
2019-07-28 11:52:17 +01:00
Phil Ellison
69244a6e18
Inline snapshots for all tests in complete_snippet, remove now-unused check_completion
2019-07-28 11:45:03 +01:00
Phil Ellison
460423e66c
Inline snapshots for all tests in presentation.rs
2019-07-28 11:35:48 +01:00
Phil Ellison
eb7d1b0fee
Inline snapshots for all tests in complete_scope.rs
2019-07-28 11:24:29 +01:00
Phil Ellison
164ba6092c
Remove unused highlights_code_inside_macro snapshot, inline rename_mod_in_dir snapshot
2019-07-28 10:42:31 +01:00
Kirill Bulatov
5169a9d498
Improve inlay hinting for types
...
Add hints for types in for loop expressions.
Resolve types for every tuple parameter.
Refactor the code.
2019-07-26 18:06:31 +03:00
Kirill Bulatov
dbbb0beb3e
Make Analysis api cancellable
2019-07-25 20:22:41 +03:00
Ekaterina Babshukova
8e49bb664a
show local variable types in completion
2019-07-23 19:26:27 +03:00
Kirill Bulatov
8f3377d9f9
Code review fixes
2019-07-22 23:25:13 +03:00
Kirill Bulatov
25398ad30d
Use SmolStr for the type text
2019-07-22 00:47:44 +03:00
Kirill Bulatov
d32774b464
Fix the string conversions
2019-07-22 00:16:07 +03:00
Kirill Bulatov
31aef808d9
Merge branch 'master' into add-type-lenses
2019-07-22 00:10:29 +03:00
Kirill Bulatov
09c7c86696
Resolve types on the server
2019-07-21 23:44:37 +03:00
Kirill Bulatov
24784c60df
Code review fixes
2019-07-21 20:51:27 +03:00
bors[bot]
443061e752
Merge #1570
...
1570: switch to upstream rowan's API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-21 13:48:46 +00:00
Ekaterina Babshukova
5fe19d2fbd
provide completion in struct patterns
2019-07-21 14:41:33 +03:00
Aleksey Kladov
d52ee59a71
streamline API
2019-07-21 13:28:58 +03:00
Kirill Bulatov
201b344f2b
Refactor server api
2019-07-20 23:45:26 +03:00
Kirill Bulatov
761fc71083
Fix tuple type lens resolution
2019-07-20 21:39:04 +03:00
Kirill Bulatov
dfa8373766
Do not show a lens when the type is declared explicitly
2019-07-20 21:39:04 +03:00