aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge #3690bors[bot]2020-03-231-0/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3690: ra_hir: add more docs r=matklad a=Veetaha Cited from [hear](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/hover/near/191446937) Co-authored-by: veetaha <[email protected]>
| * | | | | ra_hir: fix typoveetaha2020-03-231-1/+1
| | | | | |
| * | | | | ra_hir: add more docsveetaha2020-03-231-0/+12
| | |_|/ / | |/| | |
* | | | | Merge #3632bors[bot]2020-03-232-35/+59
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3632: ra_cargo_watch: log errors r=matklad a=Veetaha Until this moment we totally ignored all the errors from cargo process. Though this is still true, but we now try to log ones that are critical (i.e. misconfiguration errors and ignore compile errors). This fixes #3631, and gives us a better error message to more gracefully handle the #3265 ![image](https://user-images.githubusercontent.com/36276403/76958683-d7e1f080-6920-11ea-83d8-04561c11ccc4.png) Though I think that outputting this only to `Output` channel is not enough. We should somehow warn the user that he passed wrong arguments to `cargo-watch.args`. I didn't bother looking for how to do this now, but this PR at least gives us something. *cc* @kiljacken @matklad Co-authored-by: veetaha <[email protected]> Co-authored-by: Veetaha <[email protected]>
| * | | | | ra_cargo_watch: log exit code tooveetaha2020-03-221-1/+5
| | | | | |
| * | | | | Smol self-nitVeetaha2020-03-211-1/+1
| | | | | |
| * | | | | fix: typoveetaha2020-03-211-1/+1
| | | | | |
| * | | | | ra_cargo_watch: return Result<> from run_cargo(), and don't read stderr for nowveetaha2020-03-212-49/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As stated by matklad, reading the stderr should be done alngside with stdout via select() (or I guess poll()), there is no such implementation in stdlib, since it is quite low level and platform-dependent and it also requires quite a bit of unrelated code we don't use it for now. As referenced by bjorn3, there is an implementation of the needed read2() function in rustc compiletest. The better solution will be to extract this function to a separate crate in future: https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298
| * | | | | ra_cargo_watch: log more errorsveetaha2020-03-211-3/+16
| | | | | |
* | | | | | Merge #3681bors[bot]2020-03-232-40/+26
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3681: Only include machine-applicable suggestions r=kiljacken a=lnicola Fixes #3676 Fixes #3633 Fixes #3391 r? @kiljacken Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | Only include machine-applicable suggestionsLaurențiu Nicola2020-03-222-40/+26
| | | | | |
* | | | | | Merge #3684bors[bot]2020-03-221-1/+1
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3684: ra_hir_def: fix typo r=edwin0cheng a=Veetaha Co-authored-by: veetaha <[email protected]>
| * | | | | ra_hir_def: fix typoveetaha2020-03-221-1/+1
| | | | | |
* | | | | | Merge #3677bors[bot]2020-03-223-12/+20
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3677: Add support for macro in symbol_index r=kjeremy a=edwin0cheng This PR allows macro showing up in `Open symbol` search: ![show_macro](https://user-images.githubusercontent.com/11014119/77244297-548d0b80-6c4e-11ea-8613-15926cc297b3.png) Co-authored-by: Edwin Cheng <[email protected]>
| * | | | | Add support for macro in symbo_indexEdwin Cheng2020-03-223-12/+20
| | |_|/ / | |/| | |
* | | | | Merge #3679bors[bot]2020-03-222-26/+14
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | | | | | | | | | | | | | 3679: Some miniscule refactorings r=matklad a=Veetaha Co-authored-by: veetaha <[email protected]>
| * | | ra_hir: migrate some stuff to matches!()veetaha2020-03-221-18/+6
| | | |
| * | | ra_hir_ty: fix formattingveetaha2020-03-221-8/+8
| | | |
* | | | Merge #3673bors[bot]2020-03-211-1/+8
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | 3673: Add recursive limit for macro expansion when expanding expression r=flodiebold a=edwin0cheng cc @flodiebold Co-authored-by: Edwin Cheng <[email protected]>
| * | | Add recursive limit in expression macro expansionEdwin Cheng2020-03-211-1/+8
| | |/ | |/|
* | | Use target-name for crate-nameEdwin Cheng2020-03-211-3/+3
| | |
* | | Merge #3671bors[bot]2020-03-213-3/+56
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3671: Add identity expansion checking in ill-form expansion r=flodiebold a=edwin0cheng This PR try to add more checking code in error case in macro expansion. The bug in #3642 is introduced by #3580 , which allow ill-form macro expansion in *all* kind of macro expansions. In general we should separate hypothetical macro expansion and the actual macro expansion call. However, currently the `Semantic` workflow we are using only support single macro expansion type, we might want to review it and make it works in both ways. (Maybe add a field in `MacroCallLoc` for differentiation) Fix #3642 Co-authored-by: Edwin Cheng <[email protected]>
| * | Move test to hir_tyEdwin Cheng2020-03-212-30/+31
| | |
| * | Fix typoEdwin Cheng2020-03-211-1/+1
| | |
| * | Add identity expansion checkingEdwin Cheng2020-03-213-3/+55
| |/
* / disable invert if assist for if-let to fix #3281Josh Mcguigan2020-03-211-0/+13
|/
* 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
|