Marcus Klaas de Vries
a6146d35b1
Implement type inference for literals (WIP)
2019-01-14 13:52:55 +01:00
Aleksey Kladov
eedc08300c
goto defenition works for type-inferred methods
2019-01-13 18:56:57 +03:00
Hirokazu Hata
139da0841d
Fix tuple test case
2019-01-13 22:23:06 +09:00
Hirokazu Hata
6e73cc89b6
Implement tuple inference
2019-01-13 21:10:01 +09:00
Hirokazu Hata
829f668bd7
Add infer tuple test
2019-01-13 21:04:03 +09:00
bors[bot]
0199572a3d
Merge #517 #518
...
517: gracefully handle cycles in crate graph r=matklad a=matklad
518: Add an explanatory message when we use the Query fallback r=matklad a=DJMcNab
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/269 .
There is no good way to explain it for go_to_def, so I've just fallen back on to_vec.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2019-01-13 10:41:47 +00:00
Aleksey Kladov
77f67ca7e2
gracefully handle cycles in crate graph
...
rust-lang/rust has absolutely weird setup with rustc-workspace-shim,
which leads to real cycles.
2019-01-13 13:39:48 +03:00
Aleksey Kladov
8e554ea5fa
support ref-patterns
2019-01-13 13:36:06 +03:00
Florian Diebold
1ed7fbfc1b
args -> params
2019-01-12 21:58:16 +01:00
Florian Diebold
5db5f5cc1d
Small improvements from review comments
2019-01-12 21:51:56 +01:00
Florian Diebold
082ef52bcb
Implement basic inherent method resolution
2019-01-12 15:01:19 +01:00
Florian Diebold
1212e59bee
Fix assertion error in unification (hopefully)
...
Currently, all types that we handle during inference need to be resolved as far
as possible at the time. It's maybe too brittle of an invariant; I need to think
how we can do this better. This should fix #484 though, I hope (if
it's the same case as I managed to reproduce).
2019-01-11 22:59:00 +01:00
Aleksey Kladov
f193fbcbae
actually produce missing def kinds
2019-01-11 21:02:12 +03:00
Aleksey Kladov
19136cde00
uncopypaste def sources
2019-01-11 20:43:10 +03:00
Aleksey Kladov
0f9c350812
add missing def kinds
2019-01-11 20:28:10 +03:00
Aleksey Kladov
2d3940d0ab
rename TreePtr -> TreeArc
...
This is much clearer about the semantics
2019-01-11 19:59:06 +03:00
Aleksey Kladov
f9ed8d4d23
envapsulate navigation target better
2019-01-11 16:01:57 +03:00
Florian Diebold
a6590ce231
Use name resolution for goto definition
2019-01-10 21:32:54 +01:00
bors[bot]
dc2a8d5acc
Merge #470
...
470: Type inference for enum variants r=flodiebold a=marcusklaas
Opened a new PR instead of https://github.com/rust-analyzer/rust-analyzer/pull/461 . Totally botched that one.
I think I resolved all the issues mentioned there.
Co-authored-by: Marcus Klaas de Vries <mail@marcusklaas.nl>
2019-01-10 19:12:40 +00:00
Aleksey Kladov
32fa084c07
introduce marking infrastructure for maintainable tests
...
This also fixes a particular edge case in name resolution.
2019-01-10 16:45:09 +03:00
Marcus Klaas de Vries
e78286c8e8
Save variant names in EnumData to reduce needless queries
...
We already have their names when anyway, and when in all (current)
situations where we're interested in an Enum's variants, we want
their names.
2019-01-10 14:43:01 +01:00
Marcus Klaas de Vries
978de5cf8b
Implement type inference for enum variants
2019-01-10 14:32:56 +01:00
bors[bot]
aca14c591f
Merge #475
...
475: Show types of fields in completion r=matklad a=matklad
![image](https://user-images.githubusercontent.com/1711539/50910524-0f146200-143f-11e9-84d6-0ba80761cd89.png )
r? @flodiebold
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-10 13:07:19 +00:00
Aleksey Kladov
f72c031eb9
implement RefUnwindSafe
2019-01-10 13:04:04 +03:00
Aleksey Kladov
56b2138d82
show field types in completion
2019-01-09 19:40:11 +03:00
Aleksey Kladov
e8815b614e
nicer trailing comma handling in types
2019-01-09 19:14:21 +03:00
bors[bot]
76b3985d70
Merge #473
...
473: Partial typo fix r=matklad a=marcusklaas
This fixes some typos. Mostly in documentation, but also some code is affected (`defenition` was used in a few method names).
Co-authored-by: Marcus Klaas de Vries <mail@marcusklaas.nl>
2019-01-09 12:20:05 +00:00
Marcus Klaas de Vries
0b8fbb4fad
Fix typos in ARCHITECTURE.md and a number of crates
...
specifically: gen_lsp_server, ra_arena, ra_cli, ra_db, ra_hir
2019-01-09 01:17:09 +01:00
Aleksey Kladov
5609989368
more stable DefIds via bfs tree walking
2019-01-09 01:57:40 +03:00
Marcus Klaas de Vries
f8261d611a
Fix typo defenition -> definition
2019-01-08 23:38:51 +01:00
Aleksey Kladov
2dc85619be
one more invalidation test
2019-01-09 00:54:06 +03:00
Aleksey Kladov
bcb6fabd15
fix test naming
2019-01-09 00:49:21 +03:00
Aleksey Kladov
8f93e7b9a4
remove duplication in tests
2019-01-09 00:48:54 +03:00
Aleksey Kladov
695294bbb9
ra_db is independent from editor
2019-01-08 21:03:42 +03:00
Aleksey Kladov
13301f284c
ra_hir does not depend on ra_editor
2019-01-08 21:01:41 +03:00
Aleksey Kladov
702bdacb03
move node at offset to aglo already
2019-01-08 21:01:41 +03:00
Aleksey Kladov
ac92973a6c
move function to code_model_api
2019-01-08 20:11:13 +03:00
Aleksey Kladov
ed4f13e5c7
remove FnSignatureInfo from hir
2019-01-08 18:38:34 +03:00
Florian Diebold
946b0ba02c
Fix name resolution across source roots
...
It was using the wrong name in that case.
2019-01-08 15:16:24 +01:00
Florian Diebold
d4b44a092f
Fix use tree desugaring
2019-01-08 15:00:29 +01:00
bors[bot]
562b448f9e
Merge #458
...
458: dont reexport module id r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-08 13:36:13 +00:00
Aleksey Kladov
544c63b58e
dont reexport module id
2019-01-08 16:35:36 +03:00
Aleksey Kladov
d4c8310d05
switch interner to use arena
2019-01-08 15:53:32 +03:00
Aleksey Kladov
54e5c4f085
minimize visibility
2019-01-08 15:40:02 +03:00
Aleksey Kladov
5edcf313f6
move query impls to adt
2019-01-08 15:38:29 +03:00
Aleksey Kladov
64f202bdd7
move variant public api to api
2019-01-08 15:32:27 +03:00
Aleksey Kladov
2d0ab52212
move variants to API
2019-01-08 15:28:08 +03:00
Aleksey Kladov
71c7936932
minor
2019-01-08 15:23:56 +03:00
Aleksey Kladov
2d4dc22af8
move enum to code_model_api
2019-01-08 15:22:57 +03:00
Aleksey Kladov
e30c533eb6
move stuct to code_model_api
2019-01-08 15:19:37 +03:00