Commit graph

649 commits

Author SHA1 Message Date
Florian Diebold
4f8a49f43c Refactor method candidate generation a bit
This fixes the order in which candidates are chosen a bit (not completely
though, as the ignored test demonstrates), and makes autoderef work with trait
methods. As a side effect, this also makes completion of trait methods work :)
2019-04-14 21:53:35 +02:00
Florian Diebold
8bcbcc454c Extract generic_params method to a HasGenericParams trait 2019-04-14 13:07:45 +02:00
Florian Diebold
4497e1d3ea Add Container enum to handle both kinds of container (impl/trait) 2019-04-14 11:28:53 +02:00
Florian Diebold
7650a44640 Make callable signature handling a bit nicer 2019-04-14 11:28:53 +02:00
Florian Diebold
9339241b78 Some cleanup 2019-04-14 11:28:53 +02:00
Florian Diebold
a1ed53a4f1 More trait infrastructure
- make it possible to get parent trait from method
 - add 'obligation' machinery for checking that a type implements a
   trait (and inferring facts about type variables from that)
 - handle type parameters of traits (to a certain degree)
 - improve the hacky implements check to cover enough cases to exercise the
   handling of traits with type parameters
 - basic canonicalization (will probably also be done by Chalk)
2019-04-14 11:28:53 +02:00
Florian Diebold
413c87f155 Get substs for trait refs in impl blocks 2019-04-14 11:28:53 +02:00
Robin Freyler
6aae0cf7fa
replace usages of algo::generate with iter::successors from std 2019-04-13 16:43:49 +02:00
Aleksey Kladov
2facb5e061 cleanups 2019-04-13 14:16:46 +03:00
Aleksey Kladov
b260641e0c slight encapsulation 2019-04-13 11:29:47 +03:00
Aleksey Kladov
f9e825d956 move ScopeEntryWithSyntax 2019-04-13 11:24:09 +03:00
Aleksey Kladov
d387bdccba drop obsolete fixme 2019-04-13 11:21:32 +03:00
Aleksey Kladov
4f8dc1b9f0 make expr scope stuff private 2019-04-13 11:06:53 +03:00
Aleksey Kladov
a2cc76ce63 make resolver private 2019-04-13 11:03:02 +03:00
Aleksey Kladov
62d01dd4df hide resolver 2019-04-13 11:00:15 +03:00
Aleksey Kladov
f4a94e74bc fold ScopeWithSyntax into SourceAnalyzer 2019-04-13 10:49:01 +03:00
Aleksey Kladov
30481808fb make stuff private 2019-04-13 09:53:02 +03:00
Aleksey Kladov
1e8569dce9 make private 2019-04-13 09:46:39 +03:00
Aleksey Kladov
d4043a8dba only def-with-body remains 2019-04-13 09:45:52 +03:00
Aleksey Kladov
d88269bc2d generalize 2019-04-13 09:38:37 +03:00
Aleksey Kladov
17a0e22883 simplify 2019-04-13 09:36:28 +03:00
Aleksey Kladov
65b0073653 simplify 2019-04-13 09:33:34 +03:00
Aleksey Kladov
9ead801a9c make private 2019-04-13 09:32:25 +03:00
Aleksey Kladov
3aae223d93 hide some scopes 2019-04-13 09:31:03 +03:00
Aleksey Kladov
58fe5598e7 simplify 2019-04-13 01:32:43 +03:00
Aleksey Kladov
b0d8f9ff5d make stuff private 2019-04-13 01:07:24 +03:00
Aleksey Kladov
81e91980dd simplify 2019-04-13 01:05:18 +03:00
Aleksey Kladov
7c13e22334 simplify tests 2019-04-13 00:56:57 +03:00
Aleksey Kladov
0fd93bc14a use really correct resolver for expressions 2019-04-13 00:44:47 +03:00
Aleksey Kladov
cf2ba2791d add todo 2019-04-11 17:14:41 +03:00
Aleksey Kladov
a347208bb2 use correct resolver for expressions 2019-04-11 16:51:30 +03:00
Aleksey Kladov
ebb0c377f0 remove resolver from CompletonContext 2019-04-11 16:49:35 +03:00
Aleksey Kladov
3c9f2d0e37 simplify 2019-04-11 16:39:56 +03:00
Aleksey Kladov
5471c1ef4b generalize SourceAnalyzer to handle all defs with bodies 2019-04-11 16:37:29 +03:00
Aleksey Kladov
07cc047b4f minimize the API 2019-04-11 16:29:33 +03:00
Aleksey Kladov
b6809b6695 rename 2019-04-11 16:29:33 +03:00
Aleksey Kladov
505acc973b Make call info to use real name resolution 2019-04-11 16:29:33 +03:00
Aleksey Kladov
10d66d63d7 introduce SourceAnalyzer 2019-04-11 16:29:33 +03:00
Aleksey Kladov
6a8b3c1d4b fix typo 2019-04-11 11:13:31 +03:00
Aleksey Kladov
10726fdb65 type-safer source-map for bindings 2019-04-10 10:48:15 +03:00
Aleksey Kladov
1cd184d653 use either for uses 2019-04-10 10:12:54 +03:00
Aleksey Kladov
6b993a9760 migrate to salsas interning 2019-04-09 22:51:22 +03:00
Laurențiu Nicola
61c09edb4a Avoid two-phase borrow conflict 2019-04-08 16:47:28 +03:00
Lenard Pratt
b27fa33a9f updated snapshots 2019-04-07 13:23:18 +01:00
Lenard Pratt
e175921932 Added ArrayExprKind,
changed the  display for fixed array types,
Added Array Enum to ra_hir/expr
2019-04-07 13:23:14 +01:00
Lenard Pratt
2d73c909fe Added inference of array length 2019-04-07 13:23:12 +01:00
robojumper
ca40ca93a5 Parse and infer tuple indices 2019-04-06 01:07:35 +02:00
bors[bot]
c6c88070c4 Merge #1068
1068: profiling crate first draft r=matklad a=pasa

I've made this first draft for #961 
Could you look at it? Is this something what you are looking for?
It has lack of tests. I can't figure out how to test stderr output in rust right now. Do you have some clues?
Additionally I'm thinking about to implement procedural  macros to annotate methods with this profiler. Will it be helpful?



Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-04-03 09:09:11 +00:00
bors[bot]
fdbebccd71 Merge #1076
1076: Const body inference r=flodiebold a=Lapz

This is the second part of #887. I've added type inference on const bodies and introduced the DefWithBody containing Function, Const and Static. I want to add tests but im unsure on how I would go about testing that completions work.


Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-04-02 19:01:54 +00:00
Lenard Pratt
b9d2c2c21f made ExprCollector pub(crate) and moved
collect_fn_body_syntax
2019-04-02 19:22:06 +01:00