aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * renameAleksey Kladov2019-02-241-8/+8
| |
| * Add a test for macro parsingAleksey Kladov2019-02-232-10/+80
| |
| * implement tt -> astAleksey Kladov2019-02-232-5/+55
| |
| * keep-textAleksey Kladov2019-02-231-10/+17
| |
| * flatten ttAleksey Kladov2019-02-231-6/+55
| |
| * token source scaffoldAleksey Kladov2019-02-231-1/+22
| |
| * add dependency on the parserAleksey Kladov2019-02-232-0/+2
| |
| * add interfaceAleksey Kladov2019-02-231-0/+5
| |
| * introduce tree builderAleksey Kladov2019-02-233-20/+61
| |
| * renameAleksey Kladov2019-02-234-23/+19
| |
* | Merge #886bors[bot]2019-02-244-64/+98
|\ \ | | | | | | | | | | | | | | | | | | | | | 886: Associated method generics r=matklad a=flodiebold Refactor associated method resolution a bit and make it work with generics. Co-authored-by: Florian Diebold <[email protected]>
| * | Refactor associated method resolution a bit and make it work with genericsFlorian Diebold2019-02-234-64/+98
|/ /
* | Merge #884bors[bot]2019-02-235-1450/+1500
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 884: Split ty.rs into several modules r=matklad a=flodiebold It was just getting too big. We now have: - ty: the `Ty` enum and helpers - ty::infer: actual type inference - ty::lower: lowering from HIR to `Ty` - ty::op: helpers for binary operations, currently Co-authored-by: Florian Diebold <[email protected]>
| * | Split ty.rs into several modulesFlorian Diebold2019-02-235-1450/+1500
|/ / | | | | | | | | | | | | | | | | It was just getting too big. We now have: - ty: the `Ty` enum and helpers - ty::infer: actual type inference - ty::lower: lowering from HIR to `Ty` - ty::op: helpers for binary operations, currently
* | Merge #883bors[bot]2019-02-231-0/+79
|\ \ | | | | | | | | | | | | | | | | | | | | | 883: Fix fill_match_arms not working with references r=matklad a=vipentti This fixes #881 Co-authored-by: Ville Penttinen <[email protected]>
| * | Simplify test_fill_match_arm_refs test casesVille Penttinen2019-02-231-24/+0
| | |
| * | Fix fill_match_arms not working with referencesVille Penttinen2019-02-231-0/+103
| |/
* | Merge #882bors[bot]2019-02-231-4/+40
|\ \ | |/ |/| | | | | | | | | | | 882: emacs-lsp: Add runnables support r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
| * emacs-lsp: Add runnables supportFlorian Diebold2019-02-231-4/+40
|/
* Merge #879bors[bot]2019-02-233-11/+139
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 879: Fixes to goto definition r=vipentti a=vipentti Previously goto definition would fail when the cursor was over the name of the definition. Now we should properly resolve to a `NavigationTarget` when on top of the name of a definition. In addition this adds `name_range` field to `FileSymbol`, this further fixes goto_definition and symbol based navigation by allowing the `NavigationTarget` to actually have a `focus_range`, meaning instead of focusing on the start of the `full_range`, we can have the cursor focus on the name. e.g. goto definition ```rust fn bar() { fn foo() { } foo<|>(); } ``` Previously this would put the cursor at the start of the FN_DEF: ```rust fn bar() { <|>fn foo() { } foo(); } ``` Now when using the symbol based resolving, we'll have a proper focus range and instead put the cursor at the start of the name. ```rust fn bar() { fn <|>foo() { } foo(); } ``` This fixes #877 but doesn't contain the refactoring of the return type for `goto_definition` Co-authored-by: Ville Penttinen <[email protected]>
| * Remove unnecessary to_nav_targetVille Penttinen2019-02-231-16/+12
| |
| * Add name_range field to FileSymbolVille Penttinen2019-02-232-7/+17
| | | | | | | | | | | | This contains the syntax range of the name itself, allowing NavigationTarget to properly set the focus_range. This should make it so that when using symbol based navigation, we should always focus on the name, instead of the full range.
| * Fix NavigationTarget debug_render container_name outputVille Penttinen2019-02-231-1/+1
| |
| * Fix goto def not working when cursor was over the name of a defVille Penttinen2019-02-232-4/+126
| | | | | | | | | | We now allow goto_definition to return the named NavigationTarget if the cursor is on the name of a definition.
* | Merge #880bors[bot]2019-02-233-3/+53
|\ \ | |/ |/| | | | | | | | | | | | | | | 880: Fix resolution of associated method calls across crates r=matklad a=flodiebold I think it'll be better to make the path resolution the number of unresolved segments, not the first unresolved index; then this error could simply not have happened. But I'll do that separately. Co-authored-by: Florian Diebold <[email protected]>
| * Fix resolution of associated method calls across cratesFlorian Diebold2019-02-233-3/+53
|/ | | | | | I think it'll be better to make the path resolution the number of unresolved segments, not the first unresolved index; then this error could simply not have happened. But I'll do that separately.
* Merge #866bors[bot]2019-02-2210-31/+430
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 866: Implement basic support for Associated Methods r=flodiebold a=vipentti This is my attempt at learning to understand how the type inference works by adding basic support for associated methods. Currently it does not resolve associated types or constants. The basic idea is that `Resolver::resolve_path` returns a new `PathResult` type, which has two variants, `FullyResolved` and `PartiallyResolved`, fully resolved matches the previous behavior, where as `PartiallyResolved` contains the `PerNs<Resolution` in addition to a `segment_index` which contains the index of the segment which we failed to resolve. This index can then be used to continue inference in `infer_path_expr` using the `Type` we managed to resolve. This changes some of the previous apis, so looking for feedback and suggestions. This should enable fixing #832 Co-authored-by: Ville Penttinen <[email protected]>
| * Change resolve_path to return the fully resolved path or PerNs::noneVille Penttinen2019-02-225-36/+38
| | | | | | | | | | | | This also adds new pub(crate) resolve_path_segments which returns the PathResult, which may or may not be fully resolved. PathResult is also now pub(crate) since it is an implementation detail.
| * Ignore failing test for nowVille Penttinen2019-02-211-0/+1
| |
| * Make nameres::ResolvePathResult private and refactorVille Penttinen2019-02-211-7/+7
| |
| * Remove Const inference for now, refactor PathResultVille Penttinen2019-02-214-77/+93
| |
| * Implement basic support for Associated Methods and ConstantsVille Penttinen2019-02-2113-50/+430
| | | | | | | | | | | | | | This is done in `infer_path_expr`. When `Resolver::resolve_path` returns `PartiallyResolved`, we use the returned `Resolution` together with the given `segment_index` to check if we can find something matching the segment at segment_index in the impls for that particular type.
* | Merge #864bors[bot]2019-02-216-42/+124
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 864: Fix handling of generics in tuple variants and refactor a bit r=matklad a=flodiebold (The problem was that we created separate substitutions for the return value, so we lost the connection between the type arguments in the constructor call and the type arguments of the result.) Also make them display a tiny bit nicer. Fixes #860. Co-authored-by: Florian Diebold <[email protected]> Co-authored-by: Florian Diebold <[email protected]>
| * | Add an assert (and fix the other)Florian Diebold2019-02-211-1/+2
| | |
| * | Fix handling of generics in tuple variants and refactor a bitFlorian Diebold2019-02-206-41/+122
| |/ | | | | | | | | | | Also make them display a tiny bit nicer. Fixes #860.
* | Merge #876bors[bot]2019-02-214-10/+143
|\ \ | | | | | | | | | | | | | | | | | | | | | 876: Fix join_lines not adding a comma after join_single_expr_block with match arm r=matklad a=vipentti Fixes #868 Co-authored-by: Ville Penttinen <[email protected]>
| * | Move `non_trivia_sibling` to `ra_syntax::algo`Ville Penttinen2019-02-214-15/+13
| | |
| * | Simplify adding a comma after match armVille Penttinen2019-02-211-28/+18
| | |
| * | Fix join_lines not adding a comma after join_single_expr_block in match armVille Penttinen2019-02-211-2/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will also remove optional whitespace between the expression and the comma. e.g. ```rust fn foo() { let x = (<|>{ 4 } ,); // NOTE: whitespace } ``` becomes ```rust fn foo() { let x = (<|>4,); } ```
* | | Merge #874bors[bot]2019-02-214-11/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 874: Update lsp-types and backtrace r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | Update lsp-types and backtracekjeremy2019-02-214-11/+11
|/ / /
* | | Merge #873bors[bot]2019-02-211-0/+173
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 873: add API guide to ra_syntax r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | add API guide to ra_syntaxAleksey Kladov2019-02-211-0/+173
|/ /
* | Merge #872bors[bot]2019-02-2110-175/+168
|\ \ | | | | | | | | | | | | | | | | | | | | | 872: simplify trait bounds r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | simplify trait boundsAleksey Kladov2019-02-211-12/+18
| | |
| * | rearrange methodsAleksey Kladov2019-02-211-67/+67
| | |
| * | kill utils moduleAleksey Kladov2019-02-2110-114/+101
|/ /
* | Merge #871bors[bot]2019-02-212-521/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | 871: Ignore lockfile in fuzz r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Ignore lockfile in fuzzAleksey Kladov2019-02-212-521/+1
| | | | | | | | | | | | It's too much trouble maintaining it
* | | Merge #870bors[bot]2019-02-2111-98/+143
|\| | | | | | | | | | | | | | | | | | | | | | | 870: docs r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>