aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
* Merge #3623bors[bot]2020-03-201-25/+177
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3623: 'Fill match arms' should work with existing match arms r=matklad a=slyngbaek Addresses #3039 This essentially adds missing match arms. The algorithm for this can get complicated rather quickly so bail in certain conditions and rely on a PlaceholderPat. The algorighm works as such: - Iterate through the Enum Def Variants - Attempt to see if the variant already exists as a match arm - If yes, skip the enum variant. If no, include it. - If it becomes complicated, rather than exhaustively deal with every branch, mark it as a "partial match" and simply include the placeholder. Conditions for "complication": - The match arm contains a match guard - Any kind of nested destrucuring Order the resulting merged match branches as such: 1. Provided match arms 2. Missing enum variant branch arms 3. End with Placeholder if required - Add extra tests Co-authored-by: Steffen Lyngbaek <[email protected]>
| * Address nits and suggestions.Steffen Lyngbaek2020-03-191-140/+32
| | | | | | | | | | Simplify the logic a lot by removing the check for a placeholder pat. This means the auto-fill no longer returns a compile-able value.
| * Don't show assist if all arms are presentSteffen Lyngbaek2020-03-191-33/+37
| |
| * 'Fill match arms' should work with existing match armsSteffen Lyngbaek2020-03-191-25/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses #3039 This essentially adds missing match arms. The algorithm for this can get complicated rather quickly so bail in certain conditions and rely on a PlaceholderPat. The algorighm works as such: - Iterate through the Enum Def Variants - Attempt to see if the variant already exists as a match arm - If yes, skip the enum variant. If no, include it. - If it becomes complicated, rather than exhaustively deal with every branch, mark it as a "partial match" and simply include the placeholder. Conditions for "complication": - The match arm contains a match guard - Any kind of nested destrucuring Order the resulting merged match branches as such: 1. Provided match arms 2. Missing enum variant branch arms 3. End with Placeholder if required - Add extra tests
* | Merge #3662bors[bot]2020-03-203-4/+37
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3662: Support arbitrary discriminants r=matklad a=matklad Closes #3661 bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | Support arbitrary discriminantsAleksey Kladov2020-03-203-4/+37
| |/ | | | | | | Closes #3661
* | Remove constSteffen Lyngbaek2020-03-193-6/+48
| | | | | | | | | | - Add test for @ matching - Address comments
* | Fixes to more accurately give complete_scope completionsSteffen Lyngbaek2020-03-193-15/+38
| | | | | | | | | | | | | | - Exclude const, static, functions form is_pat_binding_and_path (there might be more?) - Add a check to filter out Record Fields - Fix tests
* | - Exclude Local Scope for BindPatsSteffen Lyngbaek2020-03-192-58/+16
| | | | | | | | | | - Exclude BindPats with @ or ref - Remove outdated test and add one testing for ref
* | Completition for type name? #3418Steffen Lyngbaek2020-03-192-3/+120
|/ | | | | | | | Iterate through TupleStructPat's until a MatchArm if one exists. Store in a new is_pat_bind_and_path bool and allow the `complete_scope` to find matches. Added some tests to ensure it works in simple and nested cases.
* Simplify Arena to use a generic indexAleksey Kladov2020-03-1917-185/+175
|
* Simplify SysrootAleksey Kladov2020-03-192-22/+20
|
* More direct CargoWorkspaceAleksey Kladov2020-03-193-87/+64
|
* Cleanup importsAleksey Kladov2020-03-196-13/+17
|
* Merge nested use treesAleksey Kladov2020-03-191-20/+52
|
* GeneralizeAleksey Kladov2020-03-193-13/+14
|
* Use match_astAleksey Kladov2020-03-182-12/+15
|
* Merge imports assistAleksey Kladov2020-03-187-25/+212
| | | | Work towards #2220
* Strongly-typed generic methods for editing nodesAleksey Kladov2020-03-181-47/+49
|
* Reduce visibilityAleksey Kladov2020-03-181-28/+28
|
* ra_hir_def: remove dat fixmeveetaha2020-03-181-1/+0
|
* Use dyn-ref instead of impl to impact compile times the leastEmil Lauridsen2020-03-172-3/+3
|
* Slight readablity improvementEmil Lauridsen2020-03-171-1/+1
|
* Remove outDirOverridesEmil Lauridsen2020-03-171-8/+0
|
* Support loading OUT_DIR for CLI runsEmil Lauridsen2020-03-175-48/+81
|
* Support specifying OUT_DIR in json projectEmil Lauridsen2020-03-172-3/+22
|
* Change existing OUT_DIR override config to make use of new infrastructureEmil Lauridsen2020-03-176-51/+19
|
* Support loading OUT_DIR from cargo check at launchEmil Lauridsen2020-03-177-114/+239
|
* Check that no file contains trailing wsAleksey Kladov2020-03-175-111/+111
| | | | rustfmt allows trailing spaces in string literals unfortunately.
* Fix typophynalle2020-03-171-2/+2
|
* Small fixesFlorian Diebold2020-03-161-4/+2
|
* Some more refactoringFlorian Diebold2020-03-162-58/+76
|
* Some cleanupFlorian Diebold2020-03-161-5/+7
|
* Turn ExpandResult into structFlorian Diebold2020-03-166-43/+63
|
* Fix remaining test failureFlorian Diebold2020-03-162-9/+11
|
* Fix performance problemFlorian Diebold2020-03-162-32/+37
|
* Better fix for stuck parser?Florian Diebold2020-03-161-3/+3
|
* Add test, remove printlnsFlorian Diebold2020-03-164-3/+53
|
* Get tests workingFlorian Diebold2020-03-165-7/+19
|
* wipFlorian Diebold2020-03-165-94/+160
|
* Attempt to implement ranking of rules when none matches perfectly (wip)Florian Diebold2020-03-163-11/+51
|
* Make MBE expansion more resilient (WIP)Florian Diebold2020-03-1610-91/+168
|
* Use `dyn Trait` for working with databseAleksey Kladov2020-03-1651-794/+813
| | | | | | | It improves compile time in `--release` mode quite a bit, it doesn't really slow things down and, conceptually, it seems closer to what we want the physical architecture to look like (we don't want to monomorphise EVERYTHING in a single leaf crate).
* Remove dat fixmeVeetaha2020-03-161-1/+1
|
* Merge #3573bors[bot]2020-03-161-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3573: Check all crates of the workspace r=matklad a=matklad Previously, if the root of the was was a real crate, only this crate was checked. Ideally, we might want some kind of config here (which might be just overriding the whole command), but `--workspace` is def a nicer default. r? @kiljacken Co-authored-by: Aleksey Kladov <[email protected]>
| * Check all crates of the workspaceAleksey Kladov2020-03-131-0/+1
| | | | | | | | | | | | | | | | | | Previously, if the root of the was was a real crate, only this crate was checked. Ideally, we might want some kind of config here (which might be just overriding the whole command), but `--workspace` is def a nicer default.
* | Merge #3587bors[bot]2020-03-162-11/+77
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3587: Use WorkDoneProgress LSP API for initial load r=matklad a=slyngbaek Addresses #3283 Rather than using custom UI for showing the loaded state. Rely on the WorkDoneProgress API in 3.15.0 https://microsoft.github.io/language-server-protocol/specification#workDoneProgress. No client-side work was necessary. The UI is not exactly what is described in the issue but afaict that's how VS Code implements the LSP API. - The WorkDoneProgressEnd does not appear to display its message contents (controlled by vscode) Co-authored-by: Steffen Lyngbaek <[email protected]>
| * | Fix tests part 2...Steffen Lyngbaek2020-03-161-34/+31
| | |
| * | Fix broken testsSteffen Lyngbaek2020-03-161-26/+29
| | | | | | | | | | | | - Handle case of no projects. The notification still needs to be posted
| * | Rely on the safer workspace_loaded checkSteffen Lyngbaek2020-03-161-13/+15
| | |