aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge #3689bors[bot]2020-03-234-14/+257
|\ | | | | | | | | | | | | | | | | | | | | | | 3689: implement fill match arm assist for tuple of enums r=matklad a=JoshMcguigan This updates the fill match arm assist to work in cases where the user is matching on a tuple of enums. Note, for now this does not apply when some match arms exist (other than the trivial `_`), but I think this could be added in the future. I think this also lays the groundwork for filling match arms when matching on tuples of non-enum values, for example a tuple of an enum and a boolean. Co-authored-by: Josh Mcguigan <[email protected]>
| * review commentsJosh Mcguigan2020-03-232-17/+114
| |
| * implement fill match arm assist for tuple of enumsJosh Mcguigan2020-03-234-14/+160
| |
* | Fix formattingAleksey Kladov2020-03-232-2/+2
| |
* | fix release moreAleksey Kladov2020-03-231-1/+1
| |
* | fix release moreAleksey Kladov2020-03-231-1/+1
| |
* | Fix releaseAleksey Kladov2020-03-233-10/+25
| |
* | Merge pull request #3686 from Veetaha/feature/hover-actual-type-paramsAleksey Kladov2020-03-232-15/+17
|\ \ | | | | | | ra_hir: add more privacy for Type
| * | ra_hir: add more privacy for Typeveetaha2020-03-232-15/+17
| | |
* | | Merge pull request #3678 from edwin0cheng/refactor-renameAleksey Kladov2020-03-234-26/+112
|\ \ \ | | | | | | | | Fix rename argument in macro call
| * | | Fix typoEdwin Cheng2020-03-221-1/+1
| | | | | | | | | | | | Co-Authored-By: Veetaha <[email protected]>
| * | | Add testEdwin Cheng2020-03-221-0/+57
| | | |
| * | | Improve find_all_ref work inside macroEdwin Cheng2020-03-221-9/+23
| | | |
| * | | Refactor searchEdwin Cheng2020-03-221-16/+4
| | | |
| * | | Add find_node_at_offset_with_descendEdwin Cheng2020-03-221-1/+28
| | | |
* | | | 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 #3680bors[bot]2020-03-221-9/+4
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3680: Bump proc-macro-hack and syn r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | | | Bump proc-macro-hack and synJeremy Kolb2020-03-221-9/+4
|/ / / /
* | | | 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
| | |
* | | Merge #3672bors[bot]2020-03-213-26/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3672: gen_assists_docs skip hidden files r=JoshMcguigan a=JoshMcguigan Fixes #3670 Skips hidden files when generating assist docs, which fixes an issue where the tests would fail while an editor has created a temp file in the assists directory. There is similar logic [here](https://github.com/rust-analyzer/rust-analyzer/blob/2720e2374be951bb762ff2815dd67c7ffe3419b7/xtask/tests/tidy-tests/main.rs#L157), although in that case the `DirEntry` is a `walkdir::DirEntry` rather than a `fs::DirEntry`. Also, it's not immediately clear that it is worth moving this functionality to somewhere accessible from both of these places and creating dependencies in this way. Let me know if this is off the mark. Co-authored-by: Josh Mcguigan <[email protected]>
| * | | gen_assists_docs skip hidden filesJosh Mcguigan2020-03-213-26/+21
| | |/ | |/|
* | | Merge #3674bors[bot]2020-03-211-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3674: Use target-name for crate-name in Crate graph building r=matklad a=edwin0cheng Fix #3667 Co-authored-by: Edwin Cheng <[email protected]>
| * | | 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
| |/
* | Merge #3668bors[bot]2020-03-211-0/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3668: disable invert-if assist for if-let r=matklad a=JoshMcguigan Fixes #3281 This disables the invert-if assist for if-let expressions, fixing the bug reported in #3281. While in the exact case reported in #3281, `if let Some(_) = foo { ...`, it would be possible to invert the if-let pattern, in most cases it will not be possible, so disabling this assist for if-let expressions seems reasonable. Co-authored-by: Josh Mcguigan <[email protected]>
| * | disable invert if assist for if-let to fix #3281Josh Mcguigan2020-03-211-0/+13
|/ /
* | Merge #3665bors[bot]2020-03-211-2/+0
|\ \ | |/ |/| | | | | | | | | | | 3665: vscode: remove unnecessary code r=matklad a=Veetaha This cancel is unnecessary since we cancel the previous inlay hints requests in `fetchHints()` method itself. This is not a hard error, we just called cancel() 2 times. Co-authored-by: Veetaha <[email protected]>
| * vscode: remove unnecessary codeVeetaha2020-03-201-2/+0
|/ | | This cancel is unnecessary since we cancel the previous inlay hints requests in `fetchHints()` method itself. This is not a hard error, we just called cancel() 2 times.
* Merge #3663bors[bot]2020-03-207-25/+10
|\ | | | | | | | | | | | | | | | | | | | | 3663: Make from-source install use cargo installed binary by default r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>