Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Merge #1120 | bors[bot] | 2019-04-14 | 13 | -221/+583 | |
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1120: More trait infrastructure r=matklad a=flodiebold This adds enough trait infrastructure to be able to make some deductions about type variables when resolving trait methods, while at the same time doing as little as possible that will be later replaced by Chalk :smile: E.g. (as the tests show) if we have ```rust trait Trait<T> { fn method(self) -> T } impl Trait<u32> for S {} ... S.method() ``` we can infer that the return type is `u32`. On the other hand the unification logic is so primitive that we can't handle e.g. `impl<T> Trait<T> for S<T>`. It's all quite hacky, I plan to refactor the parts that will stay, while hopefully the other parts will be replaced soon :slightly_smiling_face: In particular, we need to handle 'containers' (impls and trait defs) more cleanly, and I need to reorganize the method resolution / type inference code... Co-authored-by: Florian Diebold <[email protected]> | |||||
| * | | Extract generic_params method to a HasGenericParams trait | Florian Diebold | 2019-04-14 | 7 | -37/+33 | |
| | | | ||||||
| * | | Add Container enum to handle both kinds of container (impl/trait) | Florian Diebold | 2019-04-14 | 4 | -17/+58 | |
| | | | ||||||
| * | | Make callable signature handling a bit nicer | Florian Diebold | 2019-04-14 | 2 | -47/+36 | |
| | | | ||||||
| * | | Some cleanup | Florian Diebold | 2019-04-14 | 3 | -98/+111 | |
| | | | ||||||
| * | | More trait infrastructure | Florian Diebold | 2019-04-14 | 11 | -51/+333 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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) | |||||
| * | | Get substs for trait refs in impl blocks | Florian Diebold | 2019-04-14 | 6 | -44/+85 | |
|/ / | ||||||
* | | Merge #1143 | bors[bot] | 2019-04-13 | 6 | -24/+17 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 1143: replace usages of `algo::generate` with `iter::successors` from std r=matklad a=Robbepop Implements #1136 Co-authored-by: Robin Freyler <[email protected]> | |||||
| * | | replace usages of `algo::generate` with `iter::successors` from std | Robin Freyler | 2019-04-13 | 6 | -24/+17 | |
|/ / | ||||||
* | | Merge #1129 | bors[bot] | 2019-04-13 | 28 | -636/+568 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 1129: introduce SourceAnalyzer API for ides r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | | cleanups | Aleksey Kladov | 2019-04-13 | 2 | -13/+12 | |
| | | | ||||||
| * | | slight encapsulation | Aleksey Kladov | 2019-04-13 | 2 | -9/+13 | |
| | | | ||||||
| * | | move ScopeEntryWithSyntax | Aleksey Kladov | 2019-04-13 | 4 | -37/+34 | |
| | | | ||||||
| * | | drop obsolete fixme | Aleksey Kladov | 2019-04-13 | 2 | -5/+4 | |
| | | | ||||||
| * | | make expr scope stuff private | Aleksey Kladov | 2019-04-13 | 1 | -11/+9 | |
| | | | ||||||
| * | | make resolver private | Aleksey Kladov | 2019-04-13 | 6 | -26/+23 | |
| | | | ||||||
| * | | hide resolver | Aleksey Kladov | 2019-04-13 | 4 | -9/+17 | |
| | | | ||||||
| * | | fold ScopeWithSyntax into SourceAnalyzer | Aleksey Kladov | 2019-04-13 | 7 | -193/+159 | |
| | | | ||||||
| * | | make stuff private | Aleksey Kladov | 2019-04-13 | 1 | -3/+3 | |
| | | | ||||||
| * | | obsolete fixm | Aleksey Kladov | 2019-04-13 | 1 | -1/+0 | |
| | | | ||||||
| * | | make private | Aleksey Kladov | 2019-04-13 | 1 | -1/+1 | |
| | | | ||||||
| * | | only def-with-body remains | Aleksey Kladov | 2019-04-13 | 1 | -13/+3 | |
| | | | ||||||
| * | | generalize | Aleksey Kladov | 2019-04-13 | 1 | -15/+7 | |
| | | | ||||||
| * | | simplify | Aleksey Kladov | 2019-04-13 | 1 | -10/+5 | |
| | | | ||||||
| * | | simplify | Aleksey Kladov | 2019-04-13 | 1 | -7/+1 | |
| | | | ||||||
| * | | make private | Aleksey Kladov | 2019-04-13 | 1 | -1/+1 | |
| | | | ||||||
| * | | hide some scopes | Aleksey Kladov | 2019-04-13 | 4 | -23/+28 | |
| | | | ||||||
| * | | simplify | Aleksey Kladov | 2019-04-12 | 2 | -17/+12 | |
| | | | ||||||
| * | | make stuff private | Aleksey Kladov | 2019-04-12 | 1 | -6/+2 | |
| | | | ||||||
| * | | simplify | Aleksey Kladov | 2019-04-12 | 1 | -54/+22 | |
| | | | ||||||
| * | | simplify tests | Aleksey Kladov | 2019-04-12 | 3 | -36/+23 | |
| | | | ||||||
| * | | use really correct resolver for expressions | Aleksey Kladov | 2019-04-12 | 9 | -13/+27 | |
| | | | ||||||
| * | | fix typo | Aleksey Kladov | 2019-04-11 | 3 | -6/+6 | |
| | | | ||||||
| * | | add todo | Aleksey Kladov | 2019-04-11 | 1 | -0/+1 | |
| | | | ||||||
| * | | use correct resolver for expressions | Aleksey Kladov | 2019-04-11 | 1 | -3/+1 | |
| | | | ||||||
| * | | remove resolver from CompletonContext | Aleksey Kladov | 2019-04-11 | 5 | -31/+9 | |
| | | | ||||||
| * | | simplify | Aleksey Kladov | 2019-04-11 | 1 | -5/+3 | |
| | | | ||||||
| * | | generalize SourceAnalyzer to handle all defs with bodies | Aleksey Kladov | 2019-04-11 | 3 | -11/+51 | |
| | | | ||||||
| * | | minimize the API | Aleksey Kladov | 2019-04-11 | 2 | -23/+11 | |
| | | | ||||||
| * | | rename | Aleksey Kladov | 2019-04-11 | 10 | -18/+18 | |
| | | | ||||||
| * | | reduce visibility | Aleksey Kladov | 2019-04-11 | 1 | -3/+3 | |
| | | | ||||||
| * | | Make call info to use real name resolution | Aleksey Kladov | 2019-04-11 | 4 | -26/+33 | |
| | | | ||||||
| * | | introduce SourceAnalyzer | Aleksey Kladov | 2019-04-11 | 15 | -187/+206 | |
| | | | ||||||
* | | | Merge #1140 | bors[bot] | 2019-04-12 | 1 | -38/+38 | |
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | 1140: :arrow_up: vfs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | | :arrow_up: vfs | Aleksey Kladov | 2019-04-12 | 1 | -38/+38 | |
|/ / | ||||||
* | | Merge #1133 | bors[bot] | 2019-04-11 | 1 | -6/+6 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 1133: fix typo r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]> | |||||
| * | | fix typo | Aleksey Kladov | 2019-04-11 | 1 | -6/+6 | |
|/ / | ||||||
* | | Merge #1131 | bors[bot] | 2019-04-10 | 10 | -180/+136 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 1131: Use inline snapshots in complete_dot r=matklad a=vipentti Relates to #1127 Co-authored-by: Ville Penttinen <[email protected]> | |||||
| * | | Use inline snapshots in complete_dot | Ville Penttinen | 2019-04-10 | 10 | -180/+136 | |
| | | | ||||||
* | | | Merge #1130 | bors[bot] | 2019-04-10 | 4 | -72/+58 | |
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | 1130: Use inline snapshots in complete_fn_param r=matklad a=vipentti Relates to #1127 Co-authored-by: Ville Penttinen <[email protected]> |