Aleksey Kladov
b20d37cb49
move builtin types to hir_def
2019-10-31 10:51:54 +03:00
Aleksey Kladov
872ac566bf
push name down to hir_expand
2019-10-30 18:56:20 +03:00
Aleksey Kladov
e5300ad3ba
remove forward pointer for type_ref
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
16e620c052
move raw_items to hir_def
2019-10-30 17:43:11 +03:00
Aleksey Kladov
c9cd6aa370
Move ids to hir_def crate
2019-10-30 13:11:38 +03:00
Aleksey Kladov
a136cc0653
introduce ra_hir_def
2019-10-30 12:27:54 +03:00
Aleksey Kladov
1555a1aa0d
remove one more dependency on source roots
2019-10-14 15:15:47 +03:00
Ekaterina Babshukova
aa2f58550a
add module
methods
2019-10-09 14:59:47 +03:00
ice1000
b043358be9
Address comments: fix docs, add completion test for Self
.
2019-10-08 07:32:41 -04: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
Florian Diebold
daaf46177e
Add SubstsBuilder
...
+ further refactoring.
2019-09-26 23:03:39 +02:00
Florian Diebold
c35ef5013c
Resolve trait associated items
...
E.g. `Default::default` or `<Foo as Default>::default`.
2019-09-25 21:41:17 +02:00
Shotaro Yamada
9c45a9e586
Remove redundant clone()
2019-09-25 10:32:01 +09:00
Florian Diebold
619a8185a6
Give closures types
2019-09-24 23:05:12 +02:00
kjeremy
1808175f98
Drive by lints
2019-09-23 14:31:30 -04:00
Ekaterina Babshukova
2867c40925
introduce FromSource trait
2019-09-19 19:38:27 +03: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
Dylan MacKenzie
cd8155b7f7
Remove is_unnamed
2019-09-15 23:08:32 -07:00
Dylan MacKenzie
beac779c96
Gracefully handle const _
items in ConstData
2019-09-15 16:48:50 -07: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
bcf30d389c
generalize impl_froms to nested enums
2019-09-13 00:31:04 +03:00
Aleksey Kladov
45117c6388
make various enums "inherit" from AdtDef
2019-09-13 00:10:16 +03:00
Aleksey Kladov
6021a2a83a
cleanup hir db imports
2019-09-08 09:55:12 +03:00
Florian Diebold
8fb3cab76c
Fix crash for super trait cycles
2019-09-07 16:49:57 +02:00
Florian Diebold
a1776b27c7
Use traits from where clauses for method resolution
...
E.g. if we have `T: some::Trait`, we can call methods from that trait without it
needing to be in scope.
2019-09-07 16:30:31 +02:00
Florian Diebold
60bdb66ef2
Lower bounds on trait definition, and resolve assoc types from super traits
2019-09-07 14:31:43 +02: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
Florian Diebold
a7858bb7bf
Report type mismatches in analysis-stats
...
Only the number usually; each one individually when running with -v.
2019-09-02 14:56:38 +02:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
Florian Diebold
6cfdfdecba
Add representations of associated types
...
This adds three different representations, copied from the Chalk model:
- `Ty::Projection` is an associated type projection written somewhere in the
code, like `<Foo as Trait>::Bar`.
- `Ty::UnselectedProjection` is similar, but we don't know the trait
yet (`Foo::Bar`).
- The above representations are normalized to their actual types during type
inference. When that isn't possible, for example for `T::Item` inside an `fn
foo<T: Iterator>`, the type is normalized to an application type with
`TypeCtor::AssociatedType`.
2019-08-12 21:43:00 +02:00
Aleksey Kladov
e2b28f5bb8
migrate ra_hir to the new rowan
2019-07-19 13:16:25 +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
Muhammad Mominul Huque
09b72489dd
cargo format
2019-07-08 04:09:35 +06:00
Muhammad Mominul Huque
012fec54dc
Constify KnownName's
2019-07-08 03:29:38 +06:00
Aleksey Kladov
fd30ec406b
properly restrict diagnostics to a single file
2019-07-05 19:27:20 +03:00
bors[bot]
ec6f71576a
Merge #1491
...
1491: More clippy r=matklad a=kjeremy
A few more clippy changes.
I'm a little unsure of the second commit. It's the trivially_copy_pass_by_ref lint and there are a number of places in the code we could use it if it makes sense.
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-07-05 14:19:12 +00:00
Shotaro Yamada
d0e9cd2bc6
Fix clippy::redundant_clone
2019-07-05 12:45:58 +09:00
Jeremy Kolb
1a950cdbcf
&self -> self
...
https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
2019-07-04 23:01:40 -04:00
Jeremy Kolb
6b4ec73b7e
Clippy changes
2019-07-04 23:00:00 -04: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
Shotaro Yamada
546442df68
Add completion for type aliases
2019-07-03 03:08:39 +09:00
Florian Diebold
d37f960dfa
Complete associated methods on enums (and unions) as well
2019-06-29 12:40:01 +02:00
Aleksey Kladov
bcff61257a
Add firewall query to lang items
...
With an intermediate query, changing one module won't cause reparsing
of all modules
2019-06-19 23:46:50 +03:00
Aleksey Kladov
0caec7d250
rename XSignature -> XData
2019-06-18 20:20:08 +03:00
Florian Diebold
96c2b9c41d
Simplifications / cleanup from review
2019-06-16 12:25:04 +02:00
Florian Diebold
49489dc20c
Add basic infrastructure for assoc type projection
2019-06-15 18:21:23 +02:00