Aleksey Kladov
f924ae3b86
Move scopes to hir_def
2019-11-14 11:56:13 +03:00
Aleksey Kladov
da2ca01eba
Handle macro-generated expressions slightly less wrong
2019-11-14 10:30:30 +03:00
Aleksey Kladov
fe00db72b9
Remove owner from Body
2019-11-12 16:46:27 +03:00
Aleksey Kladov
c5a18c44e5
Introduce hir::GenericParam
...
Unlike existing hir::GenericParams, this is a global ID.
2019-11-11 17:36:27 +03:00
Aleksey Kladov
8b7f853cc1
Add hir::Local
2019-11-11 14:42:08 +03:00
Aleksey Kladov
ba2efca2bb
Move CrateDefMap to hir_def
2019-11-03 18:04:06 +03:00
Florian Diebold
8952380884
Change SourceAnalyzer method resoltion API
2019-11-01 20:01:21 +01:00
Florian Diebold
79cb0a0dab
Complete trait assoc items
2019-11-01 19:57:08 +01:00
Florian Diebold
1173c3dab5
Refactor to unify with method resolution
2019-11-01 19:57:08 +01:00
kjeremy
c46be83a34
Fixes #2143
2019-10-31 13:29:56 -04:00
kjeremy
b205a0ced3
source_binder => match_ast!
2019-10-30 16:08:27 -04:00
Aleksey Kladov
872ac566bf
push name down to hir_expand
2019-10-30 18:56:20 +03:00
Aleksey Kladov
e564334320
remove forward pointer to Path
2019-10-30 17:43:14 +03:00
Aleksey Kladov
f8ddef875a
remove forward pointer for name
2019-10-30 17:43:14 +03:00
Aleksey Kladov
c9cd6aa370
Move ids to hir_def crate
2019-10-30 13:11:38 +03:00
ice1000
6bad638928
Support inferring Self
type in enum definitions
...
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
2019-10-07 19:40:14 -04:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
uHOOCCOOHu
2ecb126f5c
Support $crate
in item and expr place.
2019-09-27 02:05:06 +08:00
Shotaro Yamada
9c45a9e586
Remove redundant clone()
2019-09-25 10:32:01 +09:00
Ekaterina Babshukova
2867c40925
introduce FromSource trait
2019-09-19 19:38:27 +03:00
Florian Diebold
828d60574f
Refactor a bit to prepare for resolving trait assoc items
2019-09-17 19:47:45 +02:00
uHOOCCOOHu
7ed3be3291
Define known paths and group names
2019-09-15 20:14:33 +08:00
uHOOCCOOHu
4926bed426
Support path starting with a type
2019-09-15 19:40:32 +08: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
63e1e63a91
start cleaning up the resolution
...
Nameres related types, like `PerNs<Resolution>`, can represent
unreasonable situations, like a local in a type namespace. We should
clean this up, by requiring that call-site specifies the kind of
resolution it expects.
2019-09-12 21:34:22 +03:00
Aleksey Kladov
6021a2a83a
cleanup hir db imports
2019-09-08 09:55:12 +03:00
Aleksey Kladov
9c3b25177e
Correctly build BodySourceMap for macro-expanded expressions
2019-09-03 11:04:38 +03:00
Aleksey Kladov
5e3f291195
fix hir for new block syntax
2019-09-02 21:23:19 +03:00
Florian Diebold
f92177cfb5
Add an expr_source method analogous to the source methods in the code model
...
... and use that instead of exposing the source map.
2019-09-02 14:56:38 +02:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
Evgenii P
9f9c5aa659
rustfmt
2019-08-04 08:45:14 +07:00
Evgenii P
8597af8ed4
Idiomatic return
2019-08-04 08:08:46 +07:00
Evgenii P
d610adfc2b
Employ early return pattern more
2019-08-04 08:03:17 +07:00
Evgenii P
4034ea9e4e
source_binder.rs: fix order of imports
2019-08-04 07:56:29 +07:00
Evgenii P
6a94f203fc
Use std::future::Future trait from stdlib
2019-08-03 17:07:20 +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
Ekaterina Babshukova
8e49bb664a
show local variable types in completion
2019-07-23 19:26:27 +03:00
Ekaterina Babshukova
5fe19d2fbd
provide completion in struct patterns
2019-07-21 14:41:33 +03:00
Aleksey Kladov
f3bdbec1b6
rename range -> text_range
2019-07-20 12:58:27 +03:00
Aleksey Kladov
5c594bcb48
cleanup casts
2019-07-19 18:22:00 +03:00
Aleksey Kladov
f9d9e0a1f7
several highlighting cleanups
...
* make stuff more type-safe by using `BindPat` instead of just `Pat`
* don't add `mut` into binding hash
* reset shadow counter when we enter a function
2019-07-19 16:09:32 +03:00
Aleksey Kladov
e2b28f5bb8
migrate ra_hir to the new rowan
2019-07-19 13:16:25 +03:00
Ekaterina Babshukova
2a1e11b36f
complete fields in enum variants
2019-07-12 20:31:49 +03:00
Aleksey Kladov
deab4caa7b
make Parse fields private
...
this is in preparation for the new rowan API
2019-07-12 19:41:13 +03:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Florian Diebold
9c5e7dd849
Implement autoderef using the Deref trait
...
- add support for other lang item targets, since we need the Deref lang item
2019-06-15 18:21:23 +02:00
Aleksey Kladov
0145d06515
use Source for module, part 1
2019-06-11 18:28:51 +03:00
Aleksey Kladov
caefa6982b
remove some hacks from nameresolution for macros
2019-06-08 20:42:02 +03:00